Caramelize the onions: Heat a large skillet over medium high heat and add the oil and diced onion. Saute for about 5 minutes to start the caramelization process. Reduce the heat to medium low and continue cooking, stirring occasionally, until browned and very tender, about 30-45 minutes. Increase the heat to brown the onions faster.
Meanwhile, add all ingredients for the pumpkin sauce to a blender. Blend until smooth, about 30 seconds.
Preheat the oven to 425 degrees Fahrenheit.
In a medium bowl, mix together the onions, black beans, and a splash of the prepared sauce until well combined. Mash the beans, leaving some chunks as desired for consistency. Spread about ⅓ cup of the sauce evenly in the bottom of a medium baking dish.
Heat the tortillas in a damp paper towel in the microwave to make them pliable. Spoon a couple spoonfuls of the bean mixture into the center of each tortilla, then roll the tortilla over the mixture. Place in the bottom of the baking dish, repeating with each tortilla. Pour desired amount of enchilada sauce over the top. Top with the shredded oaxaca and half of the queso fresco.
Transfer the baking dish to the oven and bake until the cheese is melted and the corners of the dish are bubbling, about 20-25 minutes.
Let cool for 5 minutes, then top with the remaining queso fresco and other desired toppings such as pumpkin seeds, cilantro, and pickled jalapenos.