The pie would have been sterile when it came out of the oven. If it's in a sealed air-tight package, it'll probably keep for a while, if it's unsealed it'll slow get colonized by bugs (outside and eventually inside). But few of those will be pathogenic. We seem to have a fear of meat products and food poisoning. In reality, you're just as – if not more likely – to get your Escherichia coli and friends from a salad or other uncooked veg. No one frets about a carrot left out on a counter all day. Think of the indefatigable doner, turning day on day. OK, it's possible no bacteria is drunk enough to live on it.
Raw meat on the other hand, which may be contaminated, should always be refrigerated. Fruits de mer are a special case, bad ones have usually picked up something from their own dinner, they're mostly filter feeders and accumulate toxins from algae.
I'd eat a day old, unrefrigerated pork pie, no fuss. I've certainly consumed many a vintage sausage roll with no ill-effect.