You can only use petroleum to replace the expensive parts of food, not the cheap parts
Cereal grains like flour and corn are only about \$175 per ton*. Petroleum is about \$550 per ton and non-byproduct things made from petroleum start at about \$1000 per ton meaning that if you are only trying to achieve sustenance level living, without regard for nutrition it is much cheaper and healthier to live off of cereal grains than synthetic or organic sugar. Your goal should not be to make a synthetic source of calories from petroleum, but instead to replace expensive flavoring with cheaper flavorings.
This way you can bring the actual cost of the meals way down. More importantly for your starving masses, this will force your farmers who are currently growing these cash crops free to pivot to staple crops like wheat and corn which give much larger calorie yields per acre. This means the actual material cost of your people need to live off of only \$0.13-0.17 per day; though the actual price will likely be closer to \$0.75-1.50 per day when you include all the costs and markups of packaging, distribution, and retail.
That said, your well to do population will not tolerate just eating wheat and corn all the time; so, you need to "trick" them into abandoning real food in favor of synthetic flavorings if you want to pivot to a staple centered agricultural economy. Salt and sugar are are good options because they are cheap flavorings at just \$220 and \$560 per ton respectively for giving your lower-middle class something tasty but not too expensive in terms of cost or land use. These can not really be improved on by synthetic flavoring though because they are still less than \$1000/ton
The biggest overhead in quality food comes from meat, herbs and spices; so, these are what you need to wean your middle class off of if you want to improve your available food supply for the poor. The wholesale cost of common meats and natural food flavorings are as follows:
- Chicken, Tuna, Catfish: \$1000-5000/ton
- Beef \$5000-10000/ton
- Lamb, Cayenne, Fenugreek, Mint Extract: \$10,000-25,000/ton
- Basil, Chili Pepper, Cinnamon, Coriander, Cumin, Curry Powder, Garlic Powder, Onion Powder, Oregano, Paprika, Thyme: \$25,000-50,000/ton
- Allspice, Cloves, Ginger, Licorice, Lemon Pepper: \$50,000-100,000/ton
- Cardamom, Nutmeg, Saffron, Tarragon: \$100,000-1,000,000/ton
- Vanilla Bean Extract: Over \$1,000,000/ton
So, if you can synthesize artificial meat and seasoning flavorings to make cereal based foods taste like other stuff, you can significantly reduce the cost of food without sacrificing it's apparent quality. (It's real quality may be much lower though). This way your middle class will stop buying seemingly identical but more expensive products made with real food, and it's all supply and demand trickle down from there.
That said, this is not fiction at all. This is exactly what the American food industry has been doing for the past several decades. For example, nearly all of the Mint and Vanilla extract consumed in the United States is actually made from coal tar or petroleum. These chemicals only costs about \$1,000-2,000/ton to produce making them WAY cheaper than their natural counterparts, but if we assume sugar and starches could be made from similarly expensive processes, you would not save any money by doing so.
* All prices listed in this answer are bulk, wholesale (commodity) prices. Actual consumer prices are typically much higher. Also, prices are based on approximate global averages, prices in specific areas may differ.