Social class and (possibly) species would play a role in what you're eating. Some species might have less of a social class system.
Geography plays a role. In the real world, some food sources (such as the potato) were found only in some regions until humanity developed reliable long-distance navigation and sea travel. If your world has the potato growing far from your core setting, it's entirely possible characters there don't eat it, or it's too expensive for most characters. Or maybe it simply grows everywhere and is cheap. Or maybe it was introduced already. Or maybe the PCs bring the food to the core area and made a lot of gold off of that. Or maybe the core area is where the potato grows.
A D&D setting could potentially transport food much more efficiently than in the real world. However, in some editions, transport is expensive. 4e is one of them. While you can casually teleport in 3e, you can't really do that while carrying lots of food. So in either case I don't think it would be cheap to transport spice from the Five Kingdoms of Southeast Faerun to Waterdeep, at least not magically. (Eberron's magitek would make shipping relatively cheap, I think. You still wouldn't be teleporting stuff, but you have houses devoted to enhancing ships.)
So I think most food would be local, and anything being transported a great distance must be preserved cheaply or it gets too expensive for most of the population. If you live on an island, even if you're not near the shore, you can probably buy fish that has been preserved in salt. However, you'll be eating relatively local fish, so your choice is limited.
If you live in an area that's not really suitable for cattle, you won't be eating much beef. You can eat some local animal though, perhaps oxen, or some fantasy creature.
I believe most European peasants worked on farms large enough to (barely) support their families after taxes and tithes. Whether your setting includes mandatory tithes is your business, of course

Certainly many peasants had farms that were too small and had to labor on the fields of wealthier farmers to make enough to live on. Farmers in the first group could literally be self-sufficient, but would probably barter or sell food for the sake of variety. Farmers in the second group make some sort of wage, which might be food products rather than coinage, but again these could be used to acquire a more varied source of food. Many commoners would have jobs that take them away from the farm too often, and would have to use their wages to acquire food. And finally, the really poor would have to beg, rely on alms, or both.
Generally I try to make humans of the setting much like real-life medieval humans. I believe they would be able to access trading networks at local markets on weekends to buy foods they weren't growing or weren't available within a day's walking distance, but because magical preservation is so expensive, they wouldn't be eating food from very far away.
They would be omnivores and would be able to keep themselves fed, avoid malnutrition (most of the time) and get a little variety in their diet. Vegetables and grain would probably be more varied than meat because you can transport them further before preservation becomes an issue. Meat is less varied: you might only be able to eat mutton, beef, pork, fowl and fish, as more exotic animals live on your lord's land, and to acquire those food sources you either had to buy them from the lord's agent (somewhat expensive), or become a poacher. Fruit would fall into the same category as meat; it doesn't rot as fast, but you don't want to be eating month old grapes either, instead you buy wine and water it down to make it last longer. If you live in a "frontier zone" you could become really popular if you wander off your lord's territory and come back with venison or tasty displacer beast flesh.
Due to the lack of preservation, peasants would probably have to shop weekly, and many foods aren't in season much of the year, especially winter. Foods suitable for preservation would be common. You won't be eating strawberries most of the year, you'll be eating strawberry jam, which will last longer. The butcher will sell you salt pork all winter (until he or she runs out), and you might find yourself slaughtering your animals more often in the summer, as the heat will make meat spoil faster. You'd be eating lots of hard bread that probably wouldn't rot as quickly as tastier, softer bread made with today's recipes. You'd also have to get used to cheese and yogurt, which will last a lot longer than milk.
City dwelling humans are a somewhat different story. If the city is big enough there won't be nearly enough farms within easy walking distance. Farmers would sell their wares to merchants who then take food to the cities daily. City dwellers probably shop for food daily; you don't want to wait until late in the day when the shops have run out of fresh food. There never seems to be enough food, so there's always concern about food supplies being cut off (by war, bad weather, etc). Cities have a middle class who can afford more expensive food and usually have access to ports where exotic food can be brought in daily, so expect a wider variety of food in their diet.
I generally picture half-elves as commonly living in human cities. Half-elf civilizations don't really exist outside of a few areas of the Forgotten Realms (and a couple of enclaves in Eberron). I figure they would eat the same as humans. Same thing goes for small populations of tieflings, aasimar and the like. Because their tastes differ, they might tend toward a variant diet. For instance, maybe there's a lot of vegan aasimar.
In 4e major cities have teleportation circles (see the Linked Portal description) so nobles can, at high cost, keep themselves fed no matter what. The cost of transportation expensive food is only marginally higher than transporting cheap food, so in a siege the nobles might literally be eating more expensive food than normal. Also they can use these circles to run away if things get really bad.
I think an elven diet would not be
that different from a human's. I think wild elves (elves in 4e) would live in small, possibly roving communities, and could live a hunter gatherer lifestyle. They would eat lots of fresh meat and gather as wide a variety of edible plant material as possible. Civilization (including that of high elves/eladrin) encroaching on their territory could prompt a crisis.
High elves/eladrin might live in artificial forests (were once forests, but magically shaped into buildings, with a managed ecosystem) that wouldn't provide enough food for the relatively high densities of eladrin compared to wild elves. There would probably be a fairly large number of eladrin vegans, which means less land used for less efficient meat. These lands, while more sustainable in the long run than human farms, would produce less food per acre, since the eladrin use different farming techniques. Fortunately eladrin have a high civilization level, and would be able to trade widely more easily than a lot of human civilizations. Furthermore I suspect eladrin communities tend to have fewer social classes than human communities (not no social classes, just fewer) so there's almost no desperately poor eladrin and fewer amazingly wealthy eladrin by percentage. This would enable most eladrin to afford to buy food that has been transported a long distance. With their slightly higher magic skills, I figure eladrin merchants would use large, mobile (floating?) "cold boxes" to transport food a great distance with minimal decay.
Dwarves have it rough. You can't grow plants underground, at least not without a lot of magical support such as Daylight-producing items, and those are expensive. You can grow fungi, and in many fantasy settings these fungi make powerful alcoholic brews, which dwarves sell at a high price (and use the proceeds to buy food). These fungi are living off of material trickling down from aboveground, or fertilizer bought by dwarves. The fungi probably has a low nutritional value, so dwarves need to carve out very large caverns to grow enough to keep themselves fed. That might not be enough. Dwarves might have to mine precious metals and minerals and sell them for food. Selling non-renewable metals for consumable foods sparks controversy, of course.
There's other foods underground as well, but there's much less variety, so dwarves would get heartily sick of any dwarven foods and will mob any merchant who brings them anything they're not used to. The stereotype of the "greedy dwarf" might exist because dwarves hoard money... to buy nutritious aboveground food. Dwarves might have to pay a lot for these foods, because dwarves might live far away from other civilizations, and also because foreign merchants don't like climbing mountains. They're steep and give you headaches. I suspect every dwarven mountain has a well-maintained merchant "fort" at the foot of the mountain that non-dwarven merchants bring food to, letting the dwarves carry the food up the mountain or through large tunnels directly to their communities. These tunnels would have to be well-guarded, obviously.
Halflings are pretty friendly with humans, and in most settings live near or even right beside humans rather than having their own independent countries. Many halflings are willing to live in burrows a short distance underground. These aren't as deep as dwarven communities, but could be deep enough that halflings could literally live under their own farms (or human farms that they work).
In most settings, gnomes don't seem to have their own countries, at least not in the material world. In Eberron the gnomes are the majority of the intimidating kingdom of Zilargo. In that setting gnomes are "weak-blooded wererats", a pretty good explanation for why they can talk to rats. Rats can eat anything, but civilized gnomes probably prefer better-tasting, nutritious food. In Eberron gnomes are often obsessed with hiding stuff. A gnome who owns a carriage probably hides secret compartments in it, even if they're not a smuggler, but just because they feel like it. Any gnome can find a way to secretly transport food, but in small quantities.
I suspect human and eladrin merchants don't travel far into Zilargo (and only to well-guarded facilities, where you'll be followed all day by secret police) with the gnomes transporting food to more local centers away from the eyes of outsiders. The gnomes probably don't buy finished foods, instead buying raw ingredients and making food themselves. Merchants who reach Zilargo and want to try a restaurant before they leave might be disappointed to find the food looks just like human food; the gnomes don't want to cook their own food for anyone else.
It wouldn't surprise me if most gnome-grown food is grown in "agricultural colonies" at specific points of Zilargo and then distributed. That's not very efficient, but it does let the government control food supplies, since privately-operated farms might not be tolerated by the Trust. Of course that's less efficient... or maybe that's just what the Trust wants you to think.
IIRC there was a gnome-controlled island in the Forgotten Realms, and the place is something of a magocracy. Their diet would resemble that of the eladrin (since they're also fey).
I ran a short-lived campaign where goblin food became important. The PCs were mainly elves, with a human or two, but lived in a setting where there was little distinction between the two. The core culture was a farming culture.
Nearby lived several large goblin villages, and the goblins lived off of food raided as well as hunting and gathering. The PCs found "too many" goblins, because the goblins were using an artifact to multiply food. The PCs didn't know what the artifact was at first, but when they found out they were
very happy. When the goblins came to take their artifact back (they would face literal mass starvation without it), the PCs proposed a deal: multiply their farm products instead. They would even teach the chieftains' young heirs how to farm (and take the opportunity to convert goblins to their own religion, gaining control of the goblins a generation in the future). The unstable situation had the occasional spot of tension, as it made more sense for the PCs to keep the artifact near their productive farms (the goblins would have felt safer keeping the artifact to themselves), with the goblins showing off their superior numbers whenever they came to pick up food, while the PCs went on a mass-recruiting drive to maintain some sort of advantage.