Heat the olive oil in a large sauté pan over medium heat. Add the onions and stir continuously until softened, about 8 to 10 minutes. Sprinkle in the salt, add the sliced mushrooms and continue stirring until the onions release their moisture and the pan becomes more and more dry. When this happens, add half of the thyme and the balsamic vinegar and reduce the heat to medium low. Cook the veggies, stirring occasionally, until caramelized and golden, about 20 -25 minutes or so. (If the onions start to brown, reduce the heat as low as your stove goes.) Remove from the heat and set aside.
Preheat the oven to 350°F. Adjust the oven rack to the center position.
Unfold the sheet/s of defrosted puff pastry on a parchment-lined baking sheet. I used 2 so that my tart would be a little larger and just attached the puff pastry dough; you can just use 1 sheet if desired. Fold all the edges over to create the pretty border around your tart. Top the center of the rolled out puff pastry evenly with the onion, mushrooms, thyme mixture.
Bake the tart for about 25 to 35 minutes, until the pastry is golden brown and flaky. When there is about 2-3 minutes left, if you are adding the cheese, sprinkle on the freshly grated cheese and continue baking for the remaining time. Remove it from the oven, sprinkle the remaining thyme over the top, and let it cool for about 10 minutes before slicing and serving. (Any leftover tart can be kept at room temperature, lightly covered with parchment. Best to crisp it in an oven or toaster oven prior to serving again.)