Preheat your oven to 375°F (190°C).
Grease a medium-sized baking dish with the butter, coating the bottom and sides evenly.
In a large mixing bowl, whisk together the eggs, milk, flour, salt, black pepper, and garlic powder until smooth and well combined.
Add the drained corn kernels, fresh spinach leaves, and half of the shredded cheddar cheese. Stir until everything is evenly distributed throughout the mixture.
Pour the mixture into the prepared baking dish and spread it into an even layer.
Sprinkle the remaining shredded cheddar cheese evenly over the top.
Bake in the preheated oven for 30–35 minutes, or until the casserole is set in the center and the top is golden brown.
Remove from the oven and allow the casserole to cool for 5 minutes before serving.
Scoop onto plates and serve warm as a side dish or light main course.