Preheat the oven to 350 degrees F. Grease the bottom and sides of an 8-by-8-inch baking dish with the butter.
In a large bowl, whisk together the sweet corn, cream-style corn, half-and-half, flour, maple syrup, chile flakes, garlic and scallions. Season with a nice pinch of salt and a few grinds of pepper. Taste and season more if needed. Whisk in the Cheddar, mozzarella and eggs. Pour into the prepared baking dish.
Bake until set in the center and golden brown around the edges, 50 to 60 minutes. Allow to rest for 10 to 15 minutes before serving.