Preheat oven to 425°F and butter a 9x13-inch baking dish.
Fill large pot with salted water and bring to a boil over high heat.
Cook pasta according to package directions; drain.
Meanwhile, in a large pot over medium heat, melt butter.
Add onions, and cook, stirring occasionally, until softened and light golden-brown, about 10 to 15 minutes.
Add mushrooms and cook, stirring occasionally, until onions and mushrooms are dark golden-brown in color, about 5 to 8 minutes.
Add flour and cook until no lumps remain, about 1 minute.
Stir in wine and cook until fully evaporated.
Whisk in broth and cream and bring to a simmer.
Cook, stirring occasionally, until sauce thickens, about 2-4 minutes.
Stir in thyme and season with salt and pepper, to taste.
Add pasta and 1 cup cheese and toss to coat.
Transfer pasta mixture to prepared baking dish.
Top with remaining cheese.
Bake until cheese is melted and light golden-brown, about 10 minutes.
Garnish with additional thyme and serve.