Preheat oven to 375˚F. Fill a large pot with water and bring to a boil. Add green beans and blanch for about 2 minutes. Strain into a colander and set aside.
Place a large pan over high heat. Add oil and swirl around pan. Add mushrooms and sauté for 2 to 3 minutes, until browned on each side. Season with salt and pepper.
Transfer mushrooms to a plate and set aside. Return pan back to stovetop over medium heat and melt butter. Add shallots and sauté for 2 to 3 minutes. Add garlic and continue to sauté for about 2 minutes. Season with salt and pepper.
Stir flour into mixture and cook for about 2 minutes.
Whisk in milk. Continue to whisk until no lumps remain and mixture thickens.
Remove from heat and stir in herbs, grated Parmesan, salt, and pepper.
Add mushrooms and green beans into cream sauce and fold together until everything is fully coated.
Transfer mixture to a 3 quart baking dish.
Tightly cover with foil. Bake for 20 minutes.
Remove foil and continue to bake for an additional 15 minutes.
While the casserole bakes uncovered, make the buttered panko. Place a small pan over medium heat and melt butter. Add panko and toast, stirring frequently, until breadcrumbs are lightly toasted, about 3 minutes. Remove from heat and set aside.
Remove casserole from oven. Remove foil and top with a layer of shredded mozzarella.
Then top with a later of buttered panko. Finish the casserole with a layer of fried onions.
Bake in the oven for 10 to 12 minutes. Remove from oven and cool for about 10 minutes before serving.