This is interesting, I never thought about it. I usually use the fridge for leftovers, but I have some advantages. We're a small family of 2 people, and we always cook exactly the quantity of food that we are going to eat. With some exceptions, like meat stock. In this case, I let the stock cool down for a couple of hours, then I transfer it in some container and put it in the fridge. Same think for other leftover: I let them cool down then I store them in the fridge in a proper container. I'm doing this not for health issues but just to put some order around: my kitchen is very small.
However, I never had any problem eating leftovers abandoned in their pan on the stove from the previous dinner, not to talk about pizza. But my immune system has been fortified during my army duty and 10 years of living alone as a sort of beastly caveman...
You eat what you are