Melt the butter in a heavy-bottomed pot over medium heat.
Add the onions and garlic and cook for 3 minutes.
Add the corn kernels and cook, stirring, for an additional 3 minutes.
Add the flour and stir for 1 minute, then add the cream. Once the cream is incorporated, continue to stir until the mixture comes to a boil.
Add the cooked grits, remove from the heat, and stir in jalapeo peppers. Taste and season well with salt and pepper.
With a hand-held immersion blender in the pot (or transfer the mixture to a food processor), pure the corn mixture while slowly adding the beaten eggs, until the eggs are thoroughly mixed in.
Pour the mixture into an ovenproof dish and sprinkle with the cheese.
Bake for 2530 minutes, until the center puffs and the corn pudding turns golden brown.