
Heat oven to 350 degrees.
Cook pasta in generously-salted boiling water until al dente according to package instructions.
Meanwhile, heat oil in a large skillet over medium-high heat. Add onion and saute for 5 minutes, stirring occasionally, until onion is translucent. Add green chiles and saute for an additional 2 minutes. Add enchilada sauce, shredded chicken, black beans, and corn, and stir to combine.
When the pasta reaches al dente, drain and remove from heat. Add the enchilada sauce mixture to the pasta, and stir to combine. Stir in 2 cups cheese until just combined, then transfer the pasta to a 9×13-inch greased baking dish. Sprinkle pasta with the remaining ½ cup cheese.
Bake for 15 minutes, or until cheese is melted and the mixture is warmed through. Serve immediately with optional toppings.