Preheat oven to 375°F (190°C). Grease a 9x13-inch baking dish. If using raw chicken, poach or cook and shred it now.
Heat oil in a large skillet over medium heat. Cook the chopped onion until softened, about 4–5 minutes. Add garlic and diced red pepper and cook 2 more minutes.
Add shredded chicken, black beans, corn, and diced tomatoes (or salsa) to the skillet. Stir in cumin, chili powder, smoked paprika, salt, and pepper. Cook until warmed through, then remove from heat and stir in sour cream if using.
Place half the torn tortillas in the bottom of the prepared dish. Spoon half the chicken mixture over them and sprinkle with half the cheese. Repeat layers and finish with cheese on top.
Bake uncovered for 20–25 minutes, until cheese is melted and bubbly. Broil 1–2 minutes for a browned top if desired.
Let the casserole rest 5–10 minutes before serving. Garnish with cilantro and serve with lime wedges and optional avocado.
Notes
To avoid sogginess, drain excess liquid from canned tomatoes or use thick salsa.
Leftovers keep in the refrigerator for 3–4 days; reheat in the oven for best texture.
To freeze: assemble unbaked, wrap tightly, and freeze up to 3 months.