Bring rice, water, chili powder, and salt to a low boil in a saucepan. Reduce heat to low, cover, and simmer for 20 minutes until liquid is absorbed. (If you have leftover rice on hand, you can use that and skip this step.)
Preheat oven to 375 degrees F. Spray a 9 x 13″ baking dish with cooking spray.
Spread refried beans in the bottom of baking dish, and spread cooked rice over the beans. Pour corn evenly over the rice, and drizzle about half the can of enchilada sauce evenly over the corn.
Spread diced chicken in an even layer over the corn. (If you are cooking the chicken just for this recipe, season it with a bit of Cajun seasoning and cook in the oven or skillet until cooked through.) Sprinkle cheese evenly over the chicken, and then drizzle the remaining enchilada sauce over the top.
Bake in preheated oven for 30-45 minutes until cheese is melted and sauce is bubbly. Serve casserole with a flat spatula to keep layers intact. Top with salsa, avocado, or sour cream if desired.