Preheat your oven to 350°F (175°C).
In a large skillet over medium heat, brown the ground beef with the diced onion until the beef is cooked through and the onion is soft, about 5-7 minutes. Drain excess fat if necessary.
Add the minced garlic and cook for an additional minute until fragrant.
Stir in the taco seasoning, black beans, diced tomatoes, corn, elbow macaroni, and beef broth. Bring to a simmer and cook for about 10 minutes, or until the macaroni is tender, stirring occasionally.
Season with salt and pepper to taste.
Transfer the mixture to a greased 9x13 inch baking dish. Sprinkle the shredded cheddar and Monterey Jack cheeses evenly over the top.
Bake in the preheated oven for 20-25 minutes, or until the cheese is melted and bubbly.
Remove from the oven and let it cool for a few minutes. Garnish with fresh cilantro if desired and serve with sour cream.