Combine flour, sugar, baking powder, and salt in a food processor and pulse briefly.
Add butter and pulse until pea-sized crumbs form.
Add egg and vanilla, then pulse until the dough starts clumping.
Butter a 9 or 9½-inch springform pan, line the bottom with parchment, and butter the paper.
Press dough evenly into the bottom (¼ inch thick) and 2 inches up the sides, then chill for 10 minutes.
Meanwhile, preheat the oven to 375°F.
Grind 2 tablespoons sugar with flour and tapioca in a spice grinder (skip this if using cornstarch).
Mix with the remaining sugar, then toss with peaches, blueberries, and lemon juice.
Fill the chilled crust with the fruit mixture, cover loosely with foil, and bake until golden and bubbling, about 1 hour and 45 minutes.
Cool on a rack for 20 minutes, loosen the crust with a blunt knife, remove the pan sides.
Let it cool before slicing.