STM32F4xx Flash Memory Width
The bus width doesn't affect how an amount of memory is measured. 1 MB is 1 MB, whether it's accessed by bits, bytes, or words.

If the previous authors of your application only allocated 512 KB for the program, that means they were only using half of the available memory. This could be because they were reserving the other half for something else, or because they were migrating from a smaller part. Either way, it doesn't imply anything about how the memory is organized.

Now, in practice, the STM32F4 accesses flash memory over a 128-bit bus, which is adapted to a pair of 32-bit instruction and data busses. However, again, this doesn't affect the way the capacity is calculated. It's purely an implementation detail.