Preheat the oven to 350°F/180°c.
Add the oil to a large skillet, and place over a medium-high heat. Add the onion and bell pepper and cook, stirring, for 4 minutes or until softened. Add the garlic and cook, stirring, for 1 minute or until fragrant.
Add the ground beef and cook, stirring and breaking up any lumps with the back of a spoon, for 4 minutes or until no longer pink. Add the taco seasoning and cook, stirring, for 30 seconds or until fragrant.
Add the black beans, diced tomatoes, corn kernels and rice. Stir until well combined. Season to taste with salt and pepper, and remove from the heat.
Transfer the rice mixture to a 9 x 13 inch baking dish. Cover with a sheet of foil, and bake for 30 minutes. Remove the foil, top with the shredded cheese, and bake for a further 5 minutes, or until the cheese has melted.
Garnish the casserole with the chopped fresh tomatoes, chopped cilantro and sour cream, if using. Serve with the lime wedges.