Preheat your oven to 350°F / 175°C.
Heat the olive oil in a skillet over medium-high heat.
Add the chopped onion and cook, stirring occasionally, until it softens, about 3-5 minutes.
Stir in the minced chile and ginger and cook for one more minute until fragrant.
Transfer the onion mixture from the skillet to a food processor or blender.
Add the chopped tomatoes and plantain chunks, then blend until you have a smooth purée.
In a medium ovenproof dish (like a casserole or Dutch oven), combine the blended tomato-plantain mixture with the cooked black beans, their cooking liquid, and the fresh thyme leaves.
Stir everything together, then taste and season generously with salt and pepper.
Cover the dish and bake for 40 minutes, or until the mixture is hot and bubbling throughout.
Serve immediately or let it cool and store in the refrigerator. The flavors will be even better the next day!
Don't have black beans? This recipe works beautifully with pinto beans, kidney beans, or even black-eyed peas for a different texture.