Heat a 10-inch cast-iron skillet over medium heat. Add the oil and butter and allow to melt. Add onions, garlic and pepper. Season with salt and pepper. Saute until soft, 5 to 7 minutes.
Stir in masa and stir to combine. Add cumin and chili powder and stir. Add corn, green chilis, tomatoes and beans. Season with salt and pepper and cook while stirring for 5 minutes. Turn off the heat and fold in the cheese.
Make the topping: In a large bowl, add masa, baking powder and salt. Whisk in the stock and melted butter, then fold in the cheese.
Spread the masa topping over the bean mixture, cover with foil and bake for 20 minutes. Remove foil and cook an additional 15 minutes.