Preheat the oven to 400°F. In a large cast iron skillet (or other oven-proof skillet) over medium-high heat, heat the oil. Add the onion, celery, and carrots. Cook, stirring occasionally, until the vegetables start to soften, about 5-7 minutes. Add the garlic and cook for 1 more minute.
Stir in the tomatoes (with their juices), brown sugar, kosher salt, chili powder, dry mustard, smoked paprika, cumin, and cayenne. Add the beans; bring to a simmer.
Stir in the greens, water, vinegar, and Worcestershire sauce; cook until the greens are tender, about 5-7 minutes for heartier greens like collards and kale, or almost instantly for baby spinach. Remove from the heat. Taste and season with salt and pepper, if necessary.
Sprinkle cheese on top.
Transfer the skillet to the oven. Bake for 5-10 more minutes, until the cheese melts and the filling is hot and bubbly. If you like the top more browned and crisp, place it under the broiler for 1-2 minutes (don’t walk away – keep an eye on it)! Garnish the casserole with chopped fresh parsley or other herbs for a bright, flavorful finishing touch.