Preheat the oven to 400 degrees F and line a baking sheet with parchment paper. Roll out the puff pastry into a 12-inch square on a lightly floured surface. Transfer to the prepared baking sheet and refrigerate, 15 minutes.
Meanwhile, make the filling: Combine the cream cheese, confectioners' sugar, 1 tablespoon flour, 1 teaspoon vanilla, the egg, lemon zest and nutmeg in a large bowl. Beat with a mixer on medium-high speed until smooth, about 2 minutes. Toss the fruit in a medium bowl with the apricot preserves and the remaining 1 tablespoon flour and 1/2 teaspoon vanilla.
Spread the cream cheese mixture over the puff pastry, leaving a 3-inch border. Top with the fruit mixture. Fold the edge of the pastry over the fruit by about 2 inches, pleating as needed to make a circle. Lightly beat the egg with 1 teaspoon water. Brush the puff pastry with the egg wash. Refrigerate until firm, about 20 minutes.
Scatter the butter over the fruit. Bake until the crust is golden brown and the filling is bubbling, 40 to 45 minutes, sprinkling the pistachios over the fruit during the last 15 minutes. Let cool on the baking sheet. Dust the crust with confectioners' sugar before serving.