Serving meals to residents generally triggers a separate review by the health department rather than the building department, and the two do not talk to each other. In most states a facility preparing food for people who don't live in the household needs some level of food establishment permit, and the kitchen requirements attached to that permit are where the money goes: commercial sink configuration, often a three-compartment sink plus a separate handwash, mechanical ventilation over cooking equipment, sometimes a grease interceptor. That's a $40k to $150k range on a residential kitchen depending on whether you need the hood and the interceptor. Confirm the specific requirement with your county health department, because states carve out exemptions differently and a few treat resident-only meal service in a licensed rooming house as a lower tier.
The occupancy classification question is separate and it's the one that can kill the project. Building codes distinguish between a rooming house type occupancy and a residential care or assisted living type occupancy, and providing services to residents is one of the things that can move you across that line. Personal care moves you across it much faster than food does. If your local code adopts a version where board plus lodging reads as a different use group, you're looking at sprinklers, and sprinklering a converted four-square is not a $750 a month decision.
On the economics, your $300 food cost assumes five residents who all show up and eat similar amounts. Cooking for five means labor, and if you're paying anyone to cook you've spent the entire margin. If you're cooking yourself you've bought a job with a fixed 6pm start time every weekday.
The cleaner version of the same revenue is charging for the room and leaving food alone. Whether the meals path is even available to you is a question for a local land use attorney reading your adopted code.