There is no sure answer for this question - as it depends on lots of factors: disk model, family, how long it used, how "good" was the operating environment (power source, cables, connections, temperature) and so.
I try to collect some general thoughts about long term storage, as these may help or give some thoughts:
In general mechanical parts do not damage as quickly as you may expect (unless you may drop the hard disk drive or damage it of course). There are many 20+ years old hard disk drives spinning without problems, start up without problems and the data can be read back without problems. This is somehow expected as the magnetic storage can "hold" the stored information better.
Yes, their mechanical parts have limited lifetime: the start/stop cycles, head load/unload cycles can cause wear of the mechanical components. So these can cause that a hard disk may reach the end of its lifetime sooner.
But if we discuss about long term storage (eg. removable hard disk drives, connected only for relatively short period of backup, so not running 24/7 for years) then the above may be not important.
What is more important and a very common problem: how "good" is the operating environment when saving data. For example using 2.5" USB hard disk drives (especially large capacity ones, 2 TB and above) may suffer from insufficient power and/or cable/connection issues. Even if they advertised as "USB 2.0 compatible", they can hardly work that way: USB 2.0 connection does not provide enough power for proper operation and this can cause that the drive simply can't record the data properly - and as a result, the next time (eg. months later) the affected file(s) could not be read back. Many users assume this is a failure of the disk drive itself - but no, the drive "just" suffers from the wrong operating conditions: the Disk menu -> Surface test -> Reinitialise Disk Surface test of Hard Disk Sentinel usually fixes these problems and the drive can operate again correctly.
But if we can assume that the hard disk drive operates by correct power supply at the correct temperature level and the drive originally tested correctly (eg. as recommended at https://www.hdsentinel.com/faq.php#tests Hard disk health is low or recently changed or I just installed a new (used) hard disk. How can I perform a deep analysis? ) then there should be no problem if we want to read back the stored data - even after years.
In contrast yes, SSDs (and pendrives, memory cards) use flash storage - where the information (the charge in the memory cells) can fade away.
The SSDs (and some pendrives, memory cards) may automatically re-fresh (re-program) the stored information when powered ON, but if you put the device in the cupboard for long time, this can't happen: as a result, flash storage will be harder to read back: after just some months of powered OFF state, you may see dramatic drop in performance if you want to read back the data from the SSD.
For example, a read test on a typical 480 GB SSD stored for 6 months without power ON shows the following results:
No errors - the data present, readable (wow), just the average speed of 43 MByte/sec is far from the performance we expect.
If we'd wait for some more time - we may get even worse speed (ideally) or we can see unreadable sectors, damaged/unreadable/lost files/folders and so.
(external SSDs / flash storage is also sensitive to power issues and may even require more power than hard disk drives, so the USB connection problems mentioned above is applicable for external SSDs too). Just they tolerate higher temperature and mechanical impacts better than hard disks.
For long term storage, personally I'd test the drive(s) at least once per every 1-3 years, depending on the importance of the stored data.
I usually perform a
- Disk menu -> Short self test (or Extended self test if the time allows)
- Disk menu -> Surface test -> Read test, exactly to ensure that all sectors are readable and verify the performance too
and sometimes (if required, eg. if the above performance is lower than expected, especially for a flash storage)
- Disk menu -> Surface test -> Read+Write+Read test (refresh data area) as it designed exactly to refresh the originally stored information.
Maybe you can check other topics too, as there was a discussion about slightly similar topic at:
https://www.hdsentinel.com/forum/viewtopic.php?p=21868