Melt 1 tablespoon of the butter in a large heavy skillet over medium-high heat. Add the corn, salt, and pepper. Cook, stirring occasionally, until the kernels turn deep golden brown, about 5 minutes. Transfer to a bowl.
Melt the remaining tablespoon of butter in the skillet. Add the onions and bell peppers and cook, stirring often, until the onions are wilted, about 2 minutes. Add the green onions, jalapeno, and garlic and cook, stirring, for 2 minutes, or until the vegetables are softened. Transfer to the bowl with the corn.
Add the mayonnaise, half of the cheddar cheese, half of the Monterey Jack cheese, and the cayenne and mix well to combine. Pour into an 8-inch square or other 1 to 2-quart size baking dish and sprinkle the remaining cheese on top. Bake until bubbly and golden brown, about 20 minutes. Serve hot with tortilla chips.