Preheat the oven to 350°F. Lightly coat a 9x13-inch baking dish with cooking spray and set aside.
Begin preparing the enchilada sauce. In a large skillet, warm the olive oil over medium heat. Add the diced onion and kosher salt. Sauté until softened and translucent, approximately 5 minutes.
While the onion cooks, prepare the filling by combining the shredded chicken, black beans, green chiles, salt, and pepper in a mixing bowl. Stir until evenly incorporated and set aside.
Return to the skillet and add chili powder and cumin to the cooked onion. Stir and cook briefly, about 30 seconds. Sprinkle in the flour and stir until blended. Gradually whisk in the chicken stock, followed by the tomato sauce and minced garlic. Bring the sauce to a simmer and let cook for 5 minutes, stirring occasionally, until thickened slightly.
Optional: For a smoother sauce, transfer to a blender and puree until smooth.
Pour ½ cup of the prepared enchilada sauce into the base of the greased baking dish. Mix another ½ cup of sauce into the chicken mixture.
Dip 6 tortillas into the remaining enchilada sauce, coating them well. Arrange them in a single layer to cover the bottom of the baking dish.
Spread half of the chicken mixture over the tortillas and top with 1 cup of shredded cheese.
Dip the remaining 6 tortillas in the sauce and layer them on top. Spread the remaining chicken mixture over the tortillas. Drizzle any remaining sauce over the top and finish with the remaining 2 cups of cheese.
Bake uncovered for 25 minutes, or until the cheese is melted and bubbling.