I think hard disk drives, tapes and cds have a pretty good offline life, and should last a lifetime if you, like me, are not planning on surviving to advanced age.
But do HDD last longer if they are unplugged. And only start up when they are needed? In that case wouldn't an NAS putting HDD to sleep most of the time would prolong the life time of HDD?
The time varies with temperature. Search for SSD data retention for more info.
The JEDEC standard is the one to read.