Preheat the oven to 200° degrees Celsius. Lightly spray a 9 x 13-inch baking dish with olive oil.
Heat the oil in a large pot over medium heat. Add the onion and garlic and sauté until the onion starts to become translucent.
Add the beans, tomatoes, barbecue sauce, maple syrup, tomato paste, 1 tablespoon vinegar, mustard, soy sauce, hot sauce, liquid smoke, cumin, cinnamon, and nutmeg.
Bring to a boil, then reduce the heat and simmer, stirring occasionally, for 15 minutes. Stir in the nutritional yeast (if using), salt, and pepper. Remove from the heat.
While the beans are simmering, make the cornbread batter. In a measuring cup, combine the nondairy milk and 1 tablespoon vinegar.
In a small bowl, combine the ground flaxseed and warm water. Let both mixtures sit for at least 5 minutes.
In a large bowl, whisk together the cornmeal, flour, baking powder, baking soda, salt, paprika, nutmeg, and cayenne. Add the milk mixture, flaxseed meal mixture, melted vegan margarine, and maple syrup. Mix until just combined.
Pour the beans into the prepared baking dish. Using a rubber spatula, spread the cornbread batter on top. Bake for 25 minutes, or until a toothpick inserted into the center of the cornbread comes out clean. Remove from the oven and serve warm. Leftovers can be covered and chilled 3 to 4 days.