Magnetic media (hard drives, tape) will essentially retain data indefinitely unless exposed to magnetic fields that are strong enough or until the Curie point is reached, both of which are unlikely scenarios for long-term storage. Even in cases of fire that destroys the external components of an HDD, if the platters didn't get hot enough the data is still there:
Flash-based memory is different - unlike magnetic media which can be thought to be bistable, flash is inherently unstable (monostable); the erased state of a cell is lower energy so the electrons stored in a programmed one are "under pressure", and due to tunneling effects, slowly leak out over time.
The consequence of this is that magnetic media will continue to store information long after it's obsolete; I'm almost willing to bet that the data on a modern HDD will still be there on the platters in 100+ years, even if the rest of the drive becomes inoperable. Ditto for optical media such as pressed CDs - in that case the bits are manifested physically, and unless the medium is degraded to the point where the bits are no longer distinguishable, the data stays (theoretically, even a CD whose reflective layer has degraded is still readable via SEM or other physical means, since the data is physically pressed into it.) On the other hand, flash will slowly and irreversibly erase itself over long periods of time, as each cell returns to its non-programmed stable state.
This is not exactly true, the magnetic fields on HDD migrate around on the disk over time and eventually become unreadable by the disk. In theory the data remains recoverable for significantly longer than that but it's not 'stable'. While historically not much of a problem it's a larger issue as HDD keep increasing in capacity.
HDD actually internally refresh data to avoid this issue so their much better as 'hot' storage. Tape is designed to avoid most of these issues and is much better for long term storage.
"Magnetic media – such as floppy disks and magnetic tapes – may experience data decay as bits lose their magnetic orientation. Periodic refreshing by rewriting the data can alleviate this problem. " http://en.wikipedia.org/wiki/Data_degradation
http://istcolloq.gsfc.nasa.gov/fall2008/presentations/peders...
Flash-based memory is different - unlike magnetic media which can be thought to be bistable, flash is inherently unstable (monostable); the erased state of a cell is lower energy so the electrons stored in a programmed one are "under pressure", and due to tunneling effects, slowly leak out over time.
The consequence of this is that magnetic media will continue to store information long after it's obsolete; I'm almost willing to bet that the data on a modern HDD will still be there on the platters in 100+ years, even if the rest of the drive becomes inoperable. Ditto for optical media such as pressed CDs - in that case the bits are manifested physically, and unless the medium is degraded to the point where the bits are no longer distinguishable, the data stays (theoretically, even a CD whose reflective layer has degraded is still readable via SEM or other physical means, since the data is physically pressed into it.) On the other hand, flash will slowly and irreversibly erase itself over long periods of time, as each cell returns to its non-programmed stable state.