How to Make It
Preheat oven to 350°F with oven rack in middle of oven. Lightly coat a 13- x 9-inch glass or ceramic baking dish with cooking spray. Melt butter in a large skillet over medium-high until foamy. Add corn, onion, thyme, and garlic; cook, stirring occasionally, until lightly browned, 7 to 9 minutes. Remove from heat; stir in scallions. Let cool slightly, about 10 minutes.
Whisk together flour, sugar, baking powder, salt, and pepper in a small bowl. Whisk together milk and eggs in a large bowl until smooth. Whisk flour mixture into milk mixture until smooth. Stir in cooled corn mixture. Pour into prepared baking dish.
Bake at 350°F until lightly browned and center is set, 55 minutes to 1 hour.