Bring a large pot of water to a boil and cook the pasta shells according to the package directions until al dente. While the pasta cooks, add the green chilies and diced onion to a large skillet over medium-high heat and cook for about 2–4 minutes. Preheat your oven to 375°F.
Add the minced garlic and seasonings to the skillet and stir for about 30 seconds until fragrant. Add the butter and let it melt completely. Sprinkle in the flour and whisk everything together for about 1 minute.
Slowly pour in the heavy cream and chicken broth while stirring until the mixture is smooth with no lumps. Reduce the heat to low. Add one 7 oz bag of shredded cheese and stir until melted. Add half of the second bag of cheese and stir again, saving the rest for topping later.
Stir in the shredded chicken, corn, beans, and cooked pasta until everything is coated in the creamy cheese sauce.
Transfer the mixture to a 9x13 baking dish. Sprinkle the remaining cheese over the top and add a little extra corn if you like.
Bake in the preheated oven for about 30 minutes, or until the top is golden, bubbly, and delicious. Garnish with fresh cilantro if desired and serve warm.