Preheat your oven to 400°F (200°C). Line a baking sheet with parchment paper.
In a large skillet, heat the olive oil over medium heat. Add the sliced onions and sprinkle with a pinch of salt. Sauté for about 15-20 minutes, stirring occasionally until they become soft and caramelized.
Once the onions are caramelized, add the balsamic vinegar and thyme, stirring until well combined. Cook for another 2-3 minutes until the vinegar has reduced slightly. Season with salt and pepper to taste. Remove from heat and let cool slightly.
On a lightly floured surface, roll out the puff pastry to ensure it's thin and even. Use a sharp knife to cut the pastry into squares or circles, about 4-5 inches in diameter, depending on your preference.
Place the pastry pieces on the prepared baking sheet. Using a fork, gently prick the center of each pastry to prevent puffing.
In a small bowl, mix the crumbled goat cheese with the heavy cream to create a smooth paste. Spoon a dollop of the goat cheese mixture onto the center of each pastry piece, leaving a small border around the edges.
Top each tart with a generous spoonful of the caramelized onion mixture.
Brush the edges of the pastry with the beaten egg to give a golden finish.
Bake in the preheated oven for 20-25 minutes, or until the pastry is puffed and golden brown.
Remove from the oven and let cool slightly before serving.