Preheat the oven to 400 degrees. Spray an 8 inch square baking dish with cooking spray.
Bring 3/4 cup milk, butter, and sugar to a boil over medium high heat.
In a small bowl, whisk the flour into the remaining 1/4 c. milk until dissolved. Whisk the flour mixture into the boiling milk until smooth. This will make a white sauce.
Pour the corn into the prepared dish and sprinkle with salt and pepper. Pour the milk mixture over top of it and mix well.
Stir the beaten eggs into the corn mixture and mix well.