What is the failure mode of flash memory? I've got some chips rated for 10,000 cycles - what happens after 10k cycles? Do the chips stop writing properly, do you get read errors, etc.? Does it also happen to EEPROMs?
Flash memory degrades as a function of the number of write-erase cycles it is subjected to. Essentially the dielectric structure of the memory cell degrades and becomes unable to maintain a 'low' state. (Think of a N-channel MOSFET - a high on the gate turns the device on, which makes the drain-source resistance low. If the gate is damaged, the drain-source channel can never be established.)
There is often a mechanism to 'mask' these bad blocks once they're identified (usually by a verify operation failing after a write) preventing them from being used - a bad block table, essentially.
Here's a project designed to destroy an EEPROM by writing to it repeatedly: Flash Destroyer
According to the comments, though, it's not a particularly good demonstration:
I am guessing that this test will actually not show the real problem very obviously, or should I say early. Since I think the real issue is that the data retention time will drop with number of writes. I.e. after 1 million writes it will store the data for a number of hours specified in the datasheet. Eventually the data retention time will be so short you will see problems, but in real-life, problems with lost data would occur much earlier.
I also asked a similar question on SuperUser: What happens when a flash drive wears out?
I suppose if your flash is broken, you can write a value to it but i doesn't take it correctly. For example, some bits are maybe unable to go low anymore which yields a different value.
Some flash drives in PC's like SSDs have controllers that monitor the broken parts of the flash chips and saves the data to different spots and reports a decrease in capacity. It's just like a normal hard drive has about 0,5% of extra sectors when some turn out to be bad sectors.
If you are speaking in normal EEPROM chips or memories that are embedded into MCU's or external, I am not sure if they got any error correction system built in. It might just write the value and not know it fails in doring so correctly.