Preheat oven to 375°F (190°C). Lightly coat a 9x13 inch baking dish with cooking spray.
Cook ground beef over medium-high heat, breaking into crumbles. Add onion and cook until beef is browned and onion is softened, about 7-8 minutes. Add garlic and cook until fragrant.
Drain excess fat. Reduce heat to medium. Add chili powder, cumin, garlic powder, onion powder, salt, and pepper. Cook for 1 minute, stirring constantly.
Stir in refried beans and salsa until well combined. Remove from heat and set aside.
Pour ½ cup of enchilada sauce into the bottom of the baking dish. Spread to cover evenly.
Dip each corn tortilla in the remaining enchilada sauce for 2-3 seconds per side. Arrange 6 tortillas over the sauce in the baking dish, overlapping edges as needed.
Spread half the beef filling over the tortillas. Sprinkle with half of the cheddar and Monterey Jack cheeses.
Arrange the remaining 6 sauce-dipped tortillas over the cheese. Top with remaining beef filling and remaining cheese.
Cover with foil (spray underside with cooking spray to prevent sticking). Bake covered for 20 minutes.
Remove foil and bake uncovered for 10-15 minutes, until cheese is bubbly and golden at the edges.
Let rest for 5-10 minutes before slicing. Serve warm with desired toppings: sour cream, cilantro, jalapeños, tomatoes, or olives.