Commercially pressed discs don’t last forever, but longer than burnable discs. IIRC, they used to say 50 years for CDs, but in practice, it was a lot less. More like 20 or 30 if you store and handle them nicely. Easily less than 10 if you don’t.
Hard drives go bad over time; I don’t like trusting spinning platters much over 7 years. They can be OK, but they can suddenly stop working whenever.