many of the responses to this question involve degradation of the device itself due to reading/write.
I’m curious If i had data on a device and I left in in a drawer or attic for years, how long could it sit there before it just goes bad on its own? No reading and writing. Say you wanted to save home movies or photos etc. Something you don’t look at every day but would one day like to dust off and show your family.
A high quality CD or DVD transfer is the answer for longevity. According to the Canadian Conservation Institute you can get up to 100 years. Long article on the issue, jump to the summary at the bottom for best practices and expected lifetime for various types of CD, DVD and BD-Rs (Blu-ray): Longevity of Recordable CDs, DVDs and Blu-rays — Canadian Conservation Institute