Preheat oven to 400 F.
Cut the mushrooms into halves or if they are larger into quarters. Combine with thawed and drained green beans in a 9”x13” casserole dish.
In a small bowl whisk together olive oil, soy sauce, balsamic (if using) and pepper. Drizzle over the bean mixture.
Roast beans, uncovered for 30 minutes stirring once half way through.
While the beans are roasting, prepare the onions.
Trim the ends of the onion and remove the skin layers. Cut in half and slice each half into thin slices.
Melt butter in a large skillet and add onions and salt. Cook stirring frequently until the onions start to soften. Turn the heat down to medium-low and put the lid on for about 10 more minutes until the onions are tender. Sprinkle with a bit of extra black pepper if desired and remove from heat.
Microwave the cream cheese until it is very soft and starting to melt, about 30 seconds. In a medium mixing bowl beat together softened cream cheese, parmesan cheese and milk with a hand mixer on medium speed.
When the beans have cooked 30 minutes and are tender crisp remove from oven and scatter the onions on top. Spoon mounds of the cheese mixture over the beans and return to the oven for 6-8 minutes until heated through.