Fill a saucepan with water, bring it to a boil, and boil the ears of corn until partially cooked, about 3 minutes. Plunge the ears of corn into ice water to chill, then cut the kernels off the cobs into a bowl.
Melt the butter in a large frypan with a lid over medium heat, and cook and stir the onion until translucent and beginning to brown, about 5 minutes. Stir in the corn; cook and stir until cooked through, about 5 minutes. Add the zucchini and button squash slices, and reduce the heat to medium-low. Cover and cook, stirring occasionally, until the squash is tender and the liquid from the vegetables is cooked away, about 8 minutes.
Remove the lid, season the vegetables with salt and pepper, and sprinkle with cheddar cheese. Place the lid back on the frypan, and turn off the heat. Allow the cheese to melt, and serve hot.