Half-read a post the other day (and then got distracted) about what vegetables the poster would plant in a garden tailored to surviving food scarcity--which, to be clear, I think is an important and not at all crazy subject. Food scarcity is a possible outcome of several converging trends in the US and elsewhere--authoritarianism has led to some of the worst famines in recent history, for example, as has a rich and powerful "aristocracy" deciding that profit matters more than feeding people (ask the Irish). And then there's climate disasters, obviously. I'm not trying to be scary. I'm trying to nudge past the kneejerk reaction a lot of leftists understandably have to anything that smacks of "survivalism" and its associated hyper-individualism. The point isn't "oh god we're fucked", the point is that concerns about food scarcity are not unreasonable, and choosing to work on your (and your community's) food independence is a really good goal for those who have the resources.
That post is long gone from my dash, but I do remember it mentioning lettuce and tomatoes and corn, and me thinking that honestly those would NOT be my picks for a survival garden. Like, I want to be clear, I grow those things, and those are good things to grow! But lettuce produces almost no calories and relatively few nutrients. Corn...corn has caveats. First, it has to be planted in large blocks in order to be pollinated, because it's wind pollinated. You can't just plant a row or two. Also, if it's sweet corn, it's very highly perishable, and if it's a dry corn, like a dent corn meant for flour, it requires processing. More on that later. And tomatoes kinda combine the above problems--large, not a ton of calories, and highly perishable, PLUS they take a bit of skill to get good yields (source: me. My tomato plants always suck ass.)
I think everyone's veggie picks are going to vary wildly based on their eating habits and growing conditions. But when I think about survival gardening, I think about calories per area. That is, in a given area, with a realistic yield, how many calories you can expect to get out of a crop. Because in a survival situation, what you need more than anything is calories. Nutrients matter, but I'll be honest, if you're really suddenly eating mostly unprocessed plant foods, along with what weeds you can forage (which is quite a lot where I am), you might be doing better nutritionally than pizza and tacos. And when it comes to calories per acre, potatoes and sweet potatoes (which are not actually related botanically) are basically the undisputed kings in temperate climates.
There are a bunch of other things along those lines that I would choose to grow--beets, turnips, carrots, onions, and things less known now like skirret and salsify are the calorie-dense vegetables that my European ancestors ate before the Columbian Exchange. Everyone once again say thank you to Precolombian agronomists and farmers for potatoes, sweet potatoes, peppers, tomatoes, squash... Or there's sunchokes, which take a little getting used to in the kitchen, but in most places they absolutely cannot be beaten for plant it and forget about it perennial food.
If you do have more space, the dry corn really is a good idea, but you need some means to grind it or nixtamalize it, and that and getting it off the cob, etc., are going to take time and energy. Another crop that takes a lot of space but has a great yield of calories and easy processing is winter squash, like pumpkins. The big advantage of those is that if you pick the right varieties, these will store for months, in their original form, if you just put them someplace cool but not freezing. You can have a hubbard squash in the garage until March and then cut it up and have food in half an hour. Also, as we all know from all the adorable zoo videos, a whole lot of animals will eat squash, including chickens.
Anyhow. There's a million things you could grow, including more nutrient dense greens like mustard or collards, herbs to make staple foods more palatable, etc. But when I think gardening for food security, I think calories.