In a large skillet with a tight fitting lid, heat the olive oil over medium heat. Add the onion and cook until softened, 2 minutes. Add the garlic and cook for an additional minute, just until fragrant. Do not brown.
Add the beans, season with salt and pepper and toss to coat with the oil. Reduce the heat to medium-low, add the broth and cover. Simmer until the liquid has evaporated and the beans are tender, 18 to 25 minutes. Taste and adjust the seasoning as needed.
While the beans simmer, heat 2 tablespoons of the butter over medium heat in a separate pan. Add the mushrooms, season with salt and pepper, and sauté until the mushrooms have given off any excess liquid and are nicely browned, 8 to 10 minutes. Remove from the heat and set aside.
Spray an oblong baking dish (1-1/2 to 2 quart) with nonstick spray. Once the beans are tender, combine them with the mushrooms and layer them in the prepared pan.
The dish can be made ahead up to this point and refrigerated for up to 2 days. To reheat, bring to room temperature for 30 minutes, cover with foil and bake at 350°F for 20 minutes. Remove, uncover and continue the recipe.
Melt the remaining 2 tablespoons of butter over low heat and add the panko crumbs and parmesan cheese. Toss to combine with the melted butter, then scatter the mixture over the top of the beans and mushrooms.
Bake just until the crumbs are toasted, about 6 to 8 minutes (watch carefully). If desired, squeeze some fresh lemon juice over the top just before serving.
For an Italian-inspired version, add 1 cup very well drained diced tomatoes and 1/2 teaspoon dried oregano to the beans and mushrooms before baking.