Preheat oven to 350F.
Melt butter in a pan. Add corn, season with salt and pepper and saute untilt the corn starts to turn golden brown, about 5 minutes. Set aside.
Melt butter in a pan. Add the onion, and the pepper and saute unitl the onions are soft, about 2 minutes. Add the green onions, jalapeno and garlic. Saute about 2 more minutes.
Mix the corn, onion mixture, mayonnaise, monterey jack and cayenne in a bowl. Pour into 8 X 8-inch baking pan and top with the Cheddar.
Bake until bubbling and golden brown on top, 10-20 minutes.