If using home-cooked beans, strain them and reserve the cooking liquid. You'll need about 2 cups / 475ml of liquid; add water if you're short. If using canned beans, drain them and reserve the liquid from the can.
In a large skillet or Dutch oven, heat the olive oil over medium heat.
Add the garlic and sauté until fragrant, about 30 seconds.
Stir in the diced onions, rosemary, and dried chili or red pepper flakes.
Cook, stirring occasionally, until the onions are soft and translucent, about 10 minutes.
Add the cooked beans to the skillet along with enough of the reserved bean liquid to create a brothy consistency.
Bring to a simmer and cook for 5 minutes to let the flavors meld.
Stir in the escarole or spinach in batches, allowing it to wilt down before adding more.
Once all the greens are wilted, stir in the diced tomatoes, butter, parsley, and Parmigiano Reggiano, if using.
Remove the skillet from the heat.
Stir gently until the butter has completely melted, creating a creamy sauce. If the mixture seems too thick, add a splash more of the reserved bean liquid.
Season generously with salt and freshly ground black pepper to taste.
To serve, ladle the beans and greens into warm bowls.
Finish with a generous drizzle of high-quality extra-virgin olive oil.
Don't be afraid of the mountain of escarole! It looks like a lot, but it will wilt down significantly.
Add it to the pan in batches to make it more manageable.