Certified GKH Gardening Expert
Under pollination causes this to happen. The blossoms were pollinated, just not enough to reach all the seeds in the fruit. Some develop normally and some do not, which results in a misshapen squash.
Hand pollinating or encouraging more pollinators to your garden will help correct this. These articles will be helpful: