Melt butter in a skillet over medium heat. Add onion, bell pepper, and pimento peppers and saute until tender, about 5 minutes.
Combine eggs, corn muffin mix, green chiles, whole corn, and creamed corn in a large bowl with the onion mixture. Stir together and pour into the prepared baking pan. Drop sour cream by the spoonful on top of the mixture; cover with Cheddar cheese.
Bake in the preheated oven until casserole is firm, about 45 minutes.