How much FLASH memory is free for a program?
In a typical microcontroller, you can program all of the flash with your code. You can check the TRM to be sure -- if it talks about a boot loader in the first sector or tells you there are parts of the flash you can't erase, then those parts are reserved. But normally you get it all.

Note that that doesn't mean 100% of the flash will be used for code! You'll have interrupt vector addresses at the start of the flash. Constants and initialization values for static variables will also be stored in the flash. Your linker should take care of this for you, probably using a linker script supplied by the manufacturer (ST). The linker should give an error if your program is too big to fit in flash.

Advanced programmers can write their own linker scripts and manually assign code and data to whatever parts of the flash they want. For example, a default linker script from a manufacturer will normally put the interrupt vectors at the start of flash (or RAM, if running out of RAM).