Position an oven rack in the middle of oven and heat oven to 350 degrees.
Melt butter in a large nonstick skillet over medium-high heat. Add onions and 1 teaspoon salt. Cook until onions are just starting to brown, about 5 minutes.
Stir in brown sugar and continue to cook for about 5 minutes, stirring frequently. Onions should be golden brown.
Add 1/3 cup broth and cook 5 additional minutes. Mixture should be golden brown and sticky. Transfer onions to medium bowl.
Add remaining broth plus wine, cream, and remaining 1 teaspoon salt to skillet and bring to a boil. Scrape any browned bits off bottom. Once at a boil, remove from heat and stir in vinegar. Cover and keep warm.
In a 3-quart casserole dish, arrange half of potatoes so that they are overlapping. Sprinkle with 1 teaspoon thyme and 1/2 teaspoon pepper.
Spread all of caramelized onions on top.
Top with remaining potatoes, thyme, and pepper. Pour broth mixture over the top.
Place in oven and bake 30 minutes. Remove from oven and top with cheese. Place back in oven for 30 to 40 minutes. Let cool 15 minutes before serving.