Preheat your oven to 400 degrees Fahrenheit and line two large baking sheets with parchment paper. Make sure your wooden skewers have been soaking in water for at least half an hour to prevent them from scorching in the hot oven.
In a small bowl, mix the basil pesto with the finely chopped spinach. Ensure the spinach is chopped very small so that it distributes evenly across the pastry. Set this mixture aside along with your shredded cheeses.
Unroll one sheet of puff pastry onto a lightly floured surface. Spread the pesto and spinach mixture evenly over the entire surface. Sprinkle the shredded mozzarella and parmesan cheese over the pesto. Place the second sheet of puff pastry directly on top, pressing down gently to seal the layers together.
Using a pizza cutter or a sharp knife, cut the pastry into strips about one inch wide. Take one strip and fold it back and forth in a concertina or accordion style, starting with a wider base and getting smaller as you reach the top to create a tree shape. Thread a wooden skewer through the center of the folds from the bottom to the top.
Place the trees on the prepared baking sheets, leaving space between each one. Brush the pastry lightly with the beaten egg wash. Bake for 12 to 15 minutes or until the pastry is puffed and a beautiful golden brown. Once removed from the oven, top the point of each skewer with a cherry tomato to act as a Christmas star or bauble.