To a medium-sized bowl, add the pinto beans, black beans, corn, minced garlic, and seasonings and stir well.
Spray a 9x13 baking dish with non-stick spray. Pour half of the enchilada sauce in the bottom of the baking dish. Place about six corn tortillas over the enchilada sauce (they will overlap a little). Spread half of the bean mixture over the tortillas. Place six more tortillas over the bean mixture, then pour the remaining bean mixture over the tortillas. Pour the remaining enchilada sauce over the top. Sprinkle the cheese over top of everything, if using.
Bake for 30-35 minutes. Serve and top with your favorite toppings like sour cream, shredded lettuce, diced tomatoes, and shredded cheese.