Meanwhile, separate egg yolks and whites. In a large bowl, whisk the egg yolks, half-and-half and nutmeg together. Stir in the corn, cheese, and cooled onion mixture. Finally mix in the flour and combine well.
Beat the egg whites until they just hold onto the whisk, (soft peaks). Stir in about 1/3 of the whites into the batter, then gently fold in the rest of the whites. Turn the batter into the prepared dish and set inside a roasting pan or baking dish. Fill the pan halfway with simmering water and put in the oven. Bake until the pudding is golden brown and set in center, about 30 to 45 minutes. Serve warm.