Cook the spaghetti according to package directions.
In the final 3 minutes of cooking, add the whole ears of corn to the boiling water to cook alongside the pasta.
Drain the pasta and corn together in a colander. Immediately rinse the pasta with cold water to stop the cooking process and cool it down; drain thoroughly. Use tongs to transfer the corn to a cutting board to cool.
Transfer the cooled pasta to a large serving bowl.
Add the chopped cucumber, summer squash, red onion, celery, and red sweet pepper.
Stir to combine.
Once the corn is cool enough to handle, stand an ear upright on the cutting board. Carefully slice downwards with a sharp knife, cutting the kernels off in long planks.
For the dressing, combine the cider vinegar, olive oil, sugar, 1/2 teaspoon (10 ml / 0.3 fl oz) salt, dry mustard, and celery seeds in a screw-top jar. Seal the lid tightly and shake vigorously until well combined.
Pour the dressing over the pasta and vegetable mixture, tossing well to coat everything evenly. Gently fold in the corn planks.
Season with additional salt to your liking.
Serve immediately, or cover and chill for up to 24 hours.