Note that squash bees (genus Peponapis mostly, but also Xenoglossa) confine their foraging largely to Cucurbita proper, though males might wander onto the occasional melon flower. Like most all ground-nesting bees, Peponapis are not social but solitary. They nest in the rows, under the plants, often up against surface debris, it seems, though with big fields, they might nest anywhere. They can find plantings being rotated around on 100 acres at least. Do not rototill (or otherwise extensively cultivate) in the field for weed control during bloom to avoid burying the bees’ nest entrances. If you just had to, I’d recommend cultivating late in the day so that females were at home and could dig out the next morning. Outside of bloom, the nest cells should be deep enough (foot or more, depending on soil texture and moisture) to not be touched by regular plowing (but probably don’t rip or chisel plow). Don’t flood irrigate during bloom, and no overhead sprinkling ‘til late morning or noon. As to insecticides, there have been no systematic studies. However, liquids applied 2x weekly at dusk by a grower in Alabama (Sevin, Malathion) controlled his squash vine borer while leaving huge densities of Peponapis. I would not use dusts and certainly not microencapsulated formulations. Herbicides are not a worry for the bee.
-Jim Cane, USDA-ARS and Utah State Univ.