Preheat oven to 400 degrees.
Bring a large pot of salted water to a boil. Cook noodles according to package directions. Drain, reserving 1 cup of the pasta water.
Melt butter in a large skillet over medium-low heat. Stir in the onions and a pinch each of salt and pepper. Cook 15 minutes, stirring occasionally and monitoring the heat level to prevent burning. Turn the heat to medium-high and stir in the balsamic vinegar. Whisk together the red wine and beef broth and pour in half. Simmer for 5 minutes, then pour in the other half and simmer until the liquid is mostly absorbed and the onions are deeply browned, about 5-10 minutes longer. Move the onions to a plate and turn the heat down to medium.
In the same skillet, add a drizzle more of olive oil and stir in the mushrooms. Cook undisturbed for 5 minutes, then toss in the garlic, oregano, and red pepper flakes. Heat for an additional minute. Pour in the coconut milk, regular milk, 1/2 cup of gruyere, and the parmesan cheese. Stir until the cheese melts. Add the onions back in. Fold the pasta into the cream sauce until thoroughly coated. If the sauce seems too thick, add 1/4 cup of pasta water at a time until desired consistency is reached.
If your skillet is not oven-safe, transfer to a casserole dish or other pan. Top with remaining gruyere and the torn mozzarella. Bake for 15-20 minutes until the cheese melts and begins to turn golden in spots. Let cool 5 minutes, then serve.