So.... I grow both summer squash and cucumbers in my screened greenhouses. I use parthenocarpic varieties, of course. The cucumbers are specially bred to be parthenocarpic. The seed is expensive, but heck, just how many cucumber plants does one need? So I buy the seed. By the way, these cucumbers are seedless. No pollination = no seed.
I also grow some summer squash in the greenhouses. No way can I get squash out in my field. The moths find them all. But I the greenhouses I can grow several types. Although they are not listed as parthenocarpic in the seeds catalogs, several summer squashes will produce a fair amount of fruit regardless, without pollination. One of my favorites was Floridor, a hybrid. It consistently did good for me. By alas, the seed is getting very difficult to find, so I'm guessing it won't be available much longer.
Parthenocarpic is different from self pollinated, because no pollen is involved. And the resulting fruits are seedless. So if they're seedless how is seed produced? That's because these veggies are hybrids. I don't know how it is done, but the seeds are produced and result in a parthenocarpic variety.