I suspect you thought about this due to the Fallout TV series, and a lot of it is actually covered in the games.
The idea (in real life, outside of the Fallout universe) was that you stayed below as radiation clouds were overhead, then after a short time (weeks, few years at most) you could begin to venture back out and run back to shelter when the next storm came through. You weren't supposed to be there for decades or anything (not sure they told people that or not). What always bothered me about either method is like you said, food. So you store a year's worth, great, but what happens then? Were people expecting the government or someone there waiting to sell them food? Where did they expect that to come from? No thanks, I'd rather not be around when people (men in particular) revert to baser instincts. In reality, the shelters were B.S. in my opinion, it was a false hope peddled by gov. to keep people calm and sold by sleazy salesmen preying on that fear.
If you have a clean water source, and enough power, you can generate your own oxygen and water, this is what nuclear subs do, they run a desalinization giving them clean cooling and drinking water and oxygen. In low stress conditions you can also run ceramic bearings which require no lube and fluid bearings which almost entirely eliminates metal to metal contact. Old steam engines still work and turbines are extremely efficient and run for decades or more without problems so there are ways to do it and it is possible.
Note I had only seen up to Ep2 of the series at the time I wrote this but could give some clues to where the show is headed.
Anyhow,
In Fallout, the vaults (as shelters were called) grew their own (often?) genetically modified food that also generated oxygen, they also used large self contained fusion reactors which required few moving parts.
And yes, they had problems, one common issue was the constant maintenance and maintenance crews being overworked (usually the ventilaltion system). That and over time running out of stores, supplies etc driving them out of the vault. Not that many of the vaults needed it because most were doomed to short term failure because most were actually just social experiments designed to test human limits for long term space travel, only a couple were actual shelters for government and the restoration of the country. Turns out Vault-Tec was quite evil and corrupt, and it's theorized they were not only doing it all for the "Enclave" (who later became Remnants) but also probably even started the war. The games really give a TON of back story on this if you go into the vaults and read their history (or online), some is rather entertaining and also terrifying, the writers really got creative with some rather twisted ideas.
Edit: added a note about spoilers.