My family used to 'put up' (that means canned veggies in mason jars) food all the time. Nobody ever paid any attention to the date. We ate that stuff all the time with no thought about when it was canned.
Dry goods, rice/cereal/crackers/cookies/etc. will go 'stale' over time depending on how it is stored, but it does not go bad in the sense that it will make you sick, unless it gets wet or infested with bugs. That's why pioneers and soldiers always stock up on tons of it.
My experience is, if something is bad you will know it right away (with or without a 'date'). You will smell it when you open it or it will taste 'off', as they say. If it is bad enough to make you sick, likely you will not be able to eat it even if you want to because the very taste of it will make you vomit.
Interesting corollary is, meat/fish can spoil in the freezer. I still do not know why or how it happens. Obviously, I would never freeze bad meat. But nevertheless I have thawed stuff from my freezer and as it is thawing, I get that dead meat smell. The freezer is 'magic' for preservation, but it is not infallible.
As far as fresh greens, I eat those immediately or within 3-4 days of purchase. I have not found any way to store fresh lettuce. Even bought some 'miracle products' which promise to preserve salad greens for weeks. But nothing works except eating it right away. I once bought some hoity-toity high-end fresh hydroponic lettuce leaves. They only give you about 10 hand size leaves for sandwiches and such.
My god man, that stuff melted faster than I could eat it. I ate two or three when I got home and tried to keep the rest. It was impossible. They just evaporated/disappeared. So light and delicate you nearly had to eat them on the way home from the store. This was one-day only lettuce. There was no storing or waiting with this stuff. No wonder it is so expensive. The store has to sell it all in one day, or it's gone.