Gather the ingredients. Preheat the oven to 350 degrees F (175 degrees C). Coat a 9x13-inch baking dish with cooking spray.
Heat a large skillet over medium-high heat. Add beef and onion; cook and stir until beef is completely browned, 5 to 7 minutes. Drain and discard grease.
Stir tomato sauce, black beans, diced tomatoes, corn, and chopped green chiles into ground beef mixture; season with chili powder, cumin, garlic, oregano, and pepper flakes. Reduce heat to low; simmer for 5 minutes.
Spread about ½ cup beef mixture into the prepared baking dish; top with 3 tortillas, overlapping as needed. Spread ½ cup beef mixture over tortillas; sprinkle with 1 cup Cheddar cheese. Repeat layering once more with remaining 3 tortillas, beef mixture, and Cheddar cheese.
Bake in the preheated oven until cheese melts and mixture is heated through, about 15 minutes. Cool briefly before serving.
Serve and enjoy!
