Modified from https://www.allrecipes.com/recipe/93027/pickled-squash
In a large non-aluminum pot, combine the squash, bell pepper, and onions. Cover with salt, and let stand for 2 hours to release the liquids. Stir occasionally.
Just before the 2 hours are up, combine the sugar, vinegar, mustard seed, turmeric and celery seed in a saucepan. Bring to a boil. Drain the salty liquid from the vegetables. Pour the spice brine over the vegetables, and let stand for 2 more hours.
Bring to a boil once again, and simmer for about 5 minutes. Ladle into 1 pint sterile jars, filling with the liquid to within 1/4 inch of the top. Wipe rims with a clean towel, and run a thin spatula around the inside of the jar to remove air bubbles. Seal with lids and rings. Process for 10 minutes in a simmering water bath to seal completely.