There are several possible reasons for this to happen. Once is that they were stressed by drought, another is that an insect burrowed into the pumpkins from the underside where you couldn't see it, and another is that an insect such as the vine borer attacked the vines unbeknownst to you thus damaging the pumpkins.