Certified GKH Gardening Expert
Many varieties of yellow squash are just naturally bumpy. This is normal.
The reason for the molding varies. I am assuming that it is molding on the plant. If this is the case, it is likely that the flower was either not pollinated or under pollinated. This results in the fruit dying before it grows to full size. If it does not detach from the plant properly, then it would start to rot and mold on the plant.
The other cause may be damage to the fruit allowed rot to get into the fruit. Skin damage can be cause by animals in the garden or even rough winds knocking it around.