Occasionally we receive a call from someone who has a squash (or cucumber or melon) that just doesn’t look like what was supposedly planted. They often wish to know if that fruit had cross-pollinated with another vegetable close by. In such cases, the gardener is assuming that cross-pollination will affect the fruit. Such is not the case.
The characteristics of the fruit is determined by the mother plant and is not affected by cross-pollination. However, there will be a problem if seed is saved for the next year from a flower that was cross-pollinated. All bets are off on what you will get if that happens.
So, how do we end up with this weird fruit? Though it could be that the gardener had forgotten exactly what he planted, more likely is that the seed he planted had been cross-pollinated before packaging. Another possibility is that it came from seed that came from fruit that had rotted in the garden the previous year. Regardless, don’t worry about planting different cultivars of squash or cucumbers or melons close to one another. Though cross-pollination may occur in some cases, the fruit will not be affected. (Ward Upham)