1Preheat the oven to 400 degrees F (200 degrees C). Grease a 9x13 inch baking dish, and set aside to cool slightly.
2Melt butter in a skillet over medium heat. Add the onions, and saute until tender. Remove from heat, stir in the sour cream, and set aside.
3In a large bowl, stir together the cornbread mixes, eggs, buttermilk, corn, salt and pepper until smooth. Spread evenly in the prepared pan. Stir half of the shredded cheese into the sour cream and onion mixture, then spread over the batter in the pan. Sprinkle remaining cheese over the top.
4Bake for 25 to 30 minutes in the preheated oven, until nicely browned and firm.