Preheat oven to 400 degrees F.
Put the cubed butter in the bottom of a 9x13 baking dish. Put the cream cheese on top of the butter.
Bake for 20 minutes or until the butter is melted and the cream cheese has softened.
Add the corn, salt, black pepper, and cayenne and mix until well combined.
Next, add the jalapenos and green chilis and mix.
Add the milk and stir until well combined. The mixture will be liquidy but will thicken during baking.
Bake for 40-45 minutes, stirring halfway through.