Preheat the oven to 375°F (190°C).
Lightly grease a 9x13-inch baking dish with cooking spray or a thin layer of oil.
Cook the aromatics: Warm 1 tablespoon oil in a large skillet over medium heat. Add diced onion and cook 3–4 minutes until softened. Stir in garlic and cook 30 seconds until fragrant.
Brown the beef: Add ground beef to the skillet.
Season with a pinch of salt and pepper. Cook, breaking it up, until browned and no longer pink, about 6–8 minutes. Drain excess fat if needed.
Season the meat: Sprinkle in taco seasoning and add 1/4 cup water.
Stir and simmer 2 minutes until the mixture thickens and the seasoning coats the beef evenly.
Make it creamy: Reduce heat to low. Add cream cheese and sour cream. Stir until fully melted and smooth.
Fold in salsa, black beans, and corn (if using). Taste and adjust salt and pepper.
Prep the tortillas: Brush both sides of tortillas with the remaining oil, or give them a quick spray. This helps them crisp and prevents sogginess.
Assemble the layers: Place a layer of tortillas across the bottom of the baking dish, slightly overlapping to cover.
Spread half the creamy beef mixture over the tortillas. Sprinkle with 1/3 of the shredded cheese.
Repeat: Add another layer of tortillas, the remaining beef mixture, and another 1/3 of the cheese. Top with a final layer of tortillas and the remaining cheese.
Bake: Cover loosely with foil and bake 15 minutes.
Remove the foil and bake another 10–12 minutes, until the cheese is melted and the top is lightly golden.
Rest and serve: Let the casserole sit 8–10 minutes before slicing. This helps it set for cleaner pieces. Add toppings like lettuce, tomatoes, jalapeños, cilantro, or avocado.
Serve with lime wedges.