You can try to wipe the first sectors of the SD-Card. Afterwards the OS should detect again the correct size.
The simplest way to overwrite the first sectors is to use a disk wipe software on your PC that overwrites the SD-Card with zeros (one pass is sufficient).
It is important not to just overwrite one file or the free disk space but the while drive.
In general you can stop the disk wipe after about a minute as you don't need to overwrite it completely, the first blocks are sufficient. Afterwards eject it from your PC and re-insert the SD-Card and format it. The correct size should now be recognized.