[1] related to the chip manufacturing date ? (i.e. this flash memory will be good for exactly 20 years, then will no longer retain anything)
No.
[2] is it related to it's programming date ? (i.e. when you program this chip, it will retain it's data for 20 years)
Yes, and storage and operating temperature and how it was programmed.
And if [2], does erasing and reprogramming the chip reset the metaphorical data retention counter?
Yes, and the same applies to EEPROM data storage which becomes a problem if calibration data is lost.
Do any of the SSD's or similar flash memory/storage devices maintain a write date on the data so that it can rewrite the data before it losses the data?
Good flash drives scrub on read and perform scrubbing during idle time. Once the number of correctable errors in a sector passes some threshold, it is written to a new area, the translation table is updated, and the old sector placed back into the pool of sectors to be reused.
This is needed not only due to time since each sector was programmed but also because write *and read* operations disturb the state of other memory areas at least with NAND based flash memory.
I ran tests on various USB flash sticks I have collected and none of them performed idle time scrubbing; this makes sense given that they could lose power at any time interrupting a write operation. Whether powered continuously or not, they become corrupted within a year. I did not test them for read scrubbing.
My original question was more in the context of aging test equipment from the 80s and 90s.
I have occasionally performed firmware updates on old equipment and was wondering if that would prolong the readability of the data. (and thus the life of the instrument).
One of the first things I do with every new piece of old equipment is dump the contents of all the socketed flash and e(e)proms. If I can read them OK, I will now try to refresh them as well.
The 20 year retention specification for PROM and EPROM types of floating gate memory is very conservative; it takes into account a specified number of program cycles and temperature. I have seen more mask and fuse based ROMs fail than floating gate PROMs and EPROMs lose memory.
Some modern devices store firmware in NAND flash which is not scrubbed and has a retention time of just a few years. If their firmware is not reprogrammed on a regular schedule, then they will fail.