Preheat the oven to 350°F. Dice the onion and set aside. Butter an 8-inch square baking dish.
Heat 3 Tbsp butter in a skillet over medium heat. Add the onions and season with 1/4 tsp salt and pepper and cook, stirring occasionally until softened, 8-10 minutes.
Combine cream, half & half, eggs, flour, sugar, 2 cups corn, and remaining salt, pepper and butter to a blender. Blend until it's a uniform texture.
Add the onion and remaining corn to the blender and pulse once to just barely mix. Pour the mixture into the baking dish.
Bake 55-60 minutes until the center is just set with a tiny wobble.