Preheat oven to 375°F. Boil potatoes in salted water 15-20 minutes until very tender; drain and mash with butter and milk until smooth. Season with salt and pepper; set aside.
Heat oil in large skillet over medium; sauté onion and pepper about 6 minutes until softened. Add garlic; cook 1 minute more.
Add beans, corn, tomatoes, chili powder, cumin, paprika, and optional cayenne; stir well and cook 5 minutes until heated through. Season with salt and pepper.
Stir half the cheese into beans; spread evenly in 9x13 inch dish.
Spread potatoes over filling, making peaks with spatula or fork; top with remaining cheese.
Bake 25-30 minutes until heated through, broiling last 2-3 minutes to lightly brown peaks. Cool 5 minutes before serving.