Preheat oven to 350 degrees F (175 degrees C). Grease a 9x13-inch baking dish.
Heat butter in a skillet over medium heat; cook and stir onion and green bell pepper in hot butter until soft, 5 to 10 minutes.
Mix whole kernel corn, cream-style corn, corn muffin mix, and eggs together in a bowl; pour into the prepared baking dish. Spoon sour cream evenly over corn mixture and top with onion mixture and Cheddar cheese.
Bake in the preheated oven until cheese is browned and middle is mostly set, 30 to 45 minutes.