In my experience, tubes can easily dry rot or otherwise degrade while on the shelf, but not inside the tire. The stem can degrade though since it's exposed to light.
Spare tubes and tires should be kept in a basement or closet, ideally where it's dark and cool. They should keep many years in a cool, fairly dry and dark basement. In fact the chief mechanic for the USPS team famously "ages" all the team's tires in a basement in France for 2 or 3 years before they use any of them.
__________________
Work: the 8 hours that separates bike rides.