I roasted some butternut squash, then stored it in the refrigerator for a few days before I had time to puree it all. When I pureed it I discovered that it had fermented. What caused this to happen? It smelled and looked fine, but the bag I stored it in kept puffing up and it tastes strongly fermented like I added yeast to it.
Assuming you cooked thoroughly, your squash got innoculated after you took it out of the oven. Was your counter clean? Had you just made bread? What's the history of the storage bag? Did you recently spill yogurt in the fridge? You've got a source of contamination, and need to think carefully about everything that came in contact with the squash after you pulled it from the oven.
Pureeing creates and enormous amount of surface area to become contaminated. This is the same reason ground meat is so dangerous. Roasting the squash helped to turn much of the starch into sugar. as Roland Taylor said, the squash likely picked up spores through the air or from your hands. A warm sugary squash is a great place for yeast to begin turning sugar into CO2 or alcohol. I would try cooling it down faster or pureeing immediately after cooking and then simmering to kill any live cultures that might cause fermentation.
I think Wayfaring nailed it. Bread is most likely. After years of baking you may find you have a certain population established in your kitchen as well. It is also possible you had your windows open because it was a fine spring day and some natural yeast wandered in.
Could be that it picked up yeast or some kind of fermenting bacteria from contact with your hands, or even from the air through spores. If the agent responsible can survive the cold, then that explains it.
Being in a bag would help that process btw.
A second possibility is that you got some bacteria/fungi from the air on your squash. It's easily possible.