Soak the porcini mushrooms in a large bowl with 3 1⁄2 cups of warm water for 30 minutes. Remove the mushrooms with a slotted spoon and squeeze them over the bowl, reserving the soaking water. Rinse the mushrooms well under cold water (they can be gritty) or in a bowl of cool water and pat dry with a paper towel. Roughly chop them.
Strain the mushroom soaking liquid through a fine mesh sieve or paper towel-lined sieve into a bowl or large measuring cup to remove any grit.
Heat the butter and olive oil in a large saucepan over medium heat and sauté the onion and chard stems (if you’re using chard), until tender and translucent, about 8 minutes. Add the garlic and stir for a minute, then add the mushrooms and cook, stirring, for another couple of minutes.
Add the tomatoes with their juice, beans, rosemary, 3 cups of reserved mushroom soaking liquid (save the extra 1⁄2 cup in case you need it later) and a few grinds of black pepper.
Bring the soup to a boil, lower the heat, cover and simmer for about 35-45 minutes until all the flavors meld. Remove the rosemary sprig and discard. Add the chopped greens and cook until wilted, about 4-5 minutes for chard or kale, or 1-2 minutes for spinach.
If the soup seems too thick, thin it slightly with a little reserved mushroom water. Taste and add salt and pepper if needed. Swiss chard has more natural sodium than the other greens, so you’ll add less salt if you use chard. I add a big pinch of salt and leave it just slightly under-salted in case someone adds Parmesan.
Divide into bowls and, if desired, drizzle with some good olive oil and Parmesan over the top. Serve at once.