With certain exceptions, the shelf life of electronic components will likely exceed your shelf life! If you research the storage life of most electronic devices, it is a staggering number. One issue you will run across is oxidation of contacts, especially the tin contacts on IC's in sockets and tin connector contacts. However, this is usually remedied by removing and reseating the IC or connector.
Most component life studies concentrate on solderability of components not yet used in a product. That relates to my comment above about oxidation.
The one obvious exception for long lived electronics in the model train arena is the MTH 5V PS/2 boards, they do seem to have a limited shelf life. The 5V PS/2 boards have been known to up and die for no reason after being in storage for some time, and also when powered up after a very short period. This has happened in significant numbers.
Although others dispute it, I believe a significant part of the issues with stuff manufactured in the time period that the 5V PS/2 boards were made was the Capacitor Plague that caused a ton of premature failures of electrolytic capacitors. The story goes that several manufacturers swiped the design of some Japanese capacitors, but didn't get the whole story, and they cranked out millions of defective capacitors that failed rather quickly. I suspect since model trains can sit in the box for years, we got to enjoy some of those failures years later than the rash of computer failures I saw in the early 2000's. I actually replaced all the caps on a number of motherboards to rescue them, but it was a royal PITA. Over half of all the PS/2 boards I've seen that have failed had one particular cap brand that was obviously in distress, it's the WINCAP brand. Whenever I see one of those on a 5V PS/2 board, I replace it with a quality capacitor.