I was going to say oatmeal, but someone beat me to it.
Generally, any dish focused on carbohydrates (pasta, rice, left-over bread) and inexpensive protein sources (beans, eggs, cheese, inexpensive cuts of meat) will be cost effective, and filling, and leftovers can generally be frozen and then reheated and eaten another day. If you add vegetables into the dish, you can produce a balanced and nutritious one-pot meal.
Macaroni and cheese is one dish we ate often when I was growing up. To vary it you can add tomatoes, bell peppers, salsa, hot dogs, spam, different sorts of cheese, or any number of things. You can also use the cold leftovers as the basis for a pasta salad. We use a simple vinaigrette dressing and add leftover cold veg to it, such as peas, green beans or chunks of tomato.
Another good dish is, as others have said, spaghetti. Make a basic tomato sauce but add in inexpensive meats (I used to use what we called “chicken guts” – chicken livers and gizzards – because they cost 39 cents a pound and there were no bones) and maybe also add in carrots or zucchini. Serve the sauce over pasta for one meal, and then layer the pasta and the sauce together with cheese and bake it for a second meal.
The spaghetti sauce can be made in an enormous batch and the frozen for future use. You can put the sauce not only on pasta, but you can bake chicken or beef chuck roast in it to create a different meal, you can add bell peppers and Italian sausage, you can change the sauce by adding additional herbs, red wine, olives, mushrooms, or cheese to it, and if need be, you can even pour spaghetti sauce over toast to make a nice snack.
I also used to make various casseroles involving beans, cheese, and rice. If you buy the beans dried it will take longer to make, but the cost will be exceedingly low. When I was a kid one of our favorites was black beans cooked with onion, garlic, and a ham hock, then layered with rice and “government cheese” and baked, and then served with a tossed salad.
You might also want to invest in a crockpot (a lot of them seem to show up in garage sales and at places like Goodwill) find some decent crockpot recipes on the internet, and then go to town. In the winter when I was a student I would make some sort of soup or stew in the crockpot so I would have a hot meal ready when I got home from campus. Then I could take the leftovers and change them up with some different spicing or additional vegetables or the addition of beer, wine, soy or Worcestershire sauce, and heat it up again the next day.