It's all about your ground and environment. I pulled up some 4x4s in the last few weeks that have been down 15 years or so. All solid. Some had concrete, others didn't. The ones that did, still do ... locked onto the posts (which made them much harder to lift). They'll all be going back into the ground for a new project. I haven't had any treated boards or posts decay due to weather or ground contact alone. I have had several completely destroyed by insects to the point of being little more than cardboard.
I've seen metal rust to foil in a few years. I've seen metal sheds on concrete rusted so badly you could push them over by hand. I've dug up other metal (old corrugated tin roofing) that has been buried for much longer, discarded by the previous owner of the property that was intact enough to be painted and reused.
The shed I recently built/added on to is metal on wood posts in the ground. I made sure to keep the ends of the metal panels a few inches above ground. It's not even close to being airtight or critter proof, but it keeps the rain off things.