I'm more paranoid about food safety than most (I get it from my mom who got it from her mom who has severe OCD). The things I go by, though are usually what's
in the food. Meats and dairy I only eat for 2 days (3 if I'm feeling really good about the quality and that it was stored correctly but that is my absolute top). Fish gets eaten the next day or it gets tossed. Veggies and fruit get assessed individually. Fruit tends to ferment quicker once it's been cut into, so it usually gets eaten right away. Everything else is probably good for up to a week if it smells okay and looks okay. Your spaghetti would fall into the 'everything else' category. No meat, no dairy = good for a week.

I'd even eat that cold, but sounds like you heated it which is even better.
For the record, these are just general food rules that I would follow even when not pregnant. Realistically, there isn't a ton of concern about food poisoning in pregnancy. Usually it ends the same way it does when not pregnant, just you being miserable for a day or two. I've never heard anything about not eating left overs in pregnancy. I don't think there is any need to worry.