Preheat oven to 350°F and spray a 9x13-inch baking dish with cooking spray.
In a large skillet over medium-high heat, cook ground beef and diced onion until beef is browned and onion is softened, about 8 minutes. Drain excess fat and stir in taco seasoning according to package directions.
In a medium bowl, mix together softened cream cheese, sour cream, and diced green chiles until well combined and smooth.
Spread 1/2 cup of enchilada sauce on the bottom of the prepared baking dish. Layer 4 tortillas over the sauce, overlapping as needed to cover the bottom.
Spread half of the beef mixture over the tortillas, then dollop half of the cream cheese mixture on top and gently spread. Sprinkle with half of the black beans and 1 cup of shredded cheese.
Pour 3/4 cup enchilada sauce over the cheese layer, then repeat layers with 4 more tortillas, remaining beef, remaining cream cheese mixture, remaining black beans, and 1 cup cheese.
Top with final 4 tortillas, pour remaining enchilada sauce over the top, and sprinkle with remaining 1 cup of cheese.
Cover with aluminum foil and bake for 25 minutes, then remove foil and bake an additional 10 minutes until cheese is bubbly and golden.
Let casserole rest for 10 minutes before cutting into squares. Garnish with fresh cilantro if desired and serve warm.