Some foods are just more nutritious than others, and some foods cause more trouble than the nutrients that they provide. There is junk food that is just based on empty calories and toxic elements that then have to be worked on by the body to just remove (much more so than other food). You could say that junk food is perhaps better than no food, if someone is really starving. But it does not magically become good for you because you eat it "in moderation and variety".
Also, a “nutrient” is just something that promotes growth and provides energy. That makes olive oil and sticks of butter a lot more “nutrient rich” than a pile of broccoli. Nobody will survive on the latter alone.
If we're talking about many countries in sub saharan Africa for instance though, I'd say shortage is still a problem and probably going to get worse with climate change since Africa is particularly vulnerable (literally read an article about this yesterday but can't find the link right now)