In a skillet, brown the onion with the pepper in the oil. Add the meat, garlic, and spices and cook until the meat is golden brown. Season with salt and pepper. Stir in the beans. Spoon into a 20-com (8-inch) square baking dish and press lightly. Spread the corn on the meat mixture and cover with the mashed potatoes. If desired, sprinkle with chili powder. Bake for about 40 minutes.