Preheat the oven to 200°C and line a large baking sheet with parchment paper. In a skillet over medium heat, melt the butter with the olive oil.
Add the sliced onion, salt, and black pepper to the skillet. Cook for 12 minutes, stirring often, until the onion is soft and lightly golden. Remove from the heat and let it cool for a few minutes.
Lightly dust a work surface with the flour and unfold the puff pastry. Roll it gently just enough to smooth the seams, then cut it into 12 equal squares.
Transfer the pastry squares to the prepared baking sheet, spacing them slightly apart. Using a small knife, score a 1 cm border around each square without cutting all the way through.
Spoon a small amount of the cooked onion into the center of each pastry square, keeping the border clear. Top each one with 3 to 4 thin pear slices, slightly overlapping them.
Divide the crumbled Gorgonzola among the tartlets, then sprinkle with the chopped walnuts and fresh thyme leaves.
In a small bowl, whisk the egg with the water. Brush the exposed pastry borders lightly with the egg wash.
Bake for 20 to 25 minutes, rotating the tray halfway through, until the pastry is puffed and deep golden and the cheese is softened.
Let the tartlets rest on the baking sheet for 10 minutes before serving so the filling can settle slightly and the pastry stays crisp.