I know that platys, swordtails, and guppies eat cucumber, but do they eat squash? Again, its that "have nothing to do with all the vegitables" thing.
Squash has a milder taste than cucumbers and would be less likely to affect their GI systems. To be on the safe side, you may want to stick with one of the foods prepared specifically for aquarium use. Most staple foods are formulated for complete nutrition; cucumbers and squash likely are not.
They may be OK as an occasional treat, but be sure to remove any uneaten veggies.