I've had that happen before. It could be from soil moisture where the pumpkin touches the ground. Fungus creeps into the pumpkin from the moist soil. My successful pumpkins have been positioned so that they don't touch wet ground. For example, my pumpkin sprount landed in a dry pile of hay-like grass that was next to my garden. That pumpkin did very well, did not rot. I had success with pumkins when I was a kid. The pumpkin garden was a 3x3 square hole in the patio. The pumpkin sprouts landed on the concrete and grew to he full size, did not rot. My feet sometimes pick up fungus from the dirt. There's fungus in wet dirt.