Heat the olive oil in a large pan over medium heat. Add onion and cook until soft and translucent. Add garlic and cook until fragrant, about 30 seconds. Stir in the chicken, beans, corn, red enchilada sauce, cumin, and half of the cheese. Raise heat and bring to a simmer. Remove from heat and transfer to a 9x13-inch baking dish. Sprinkle with remaining cheese.