Preheat oven to 350 degrees. Coat an 8-inch springform pan with cooking spray. Line bottom with parchment; spray parchment. Mix together ricotta, confectioners' sugar, yolks, salt, zest, cherries, and anise in a bowl.
Let dough sit at room temperature 15 minutes. On a lightly floured surface, roll out smaller disk of dough 1/8 inch thick; using pan as guide, cut out an 8-inch round. Chill until firm. Meanwhile, roll out larger disk to an 11-inch round, about 1/4 inch thick; fit into bottom and up sides of pan, pressing and patching dough as needed.
Spread filling over dough. Fold sides of dough over filling. Brush beaten egg over folded sides. Top with 8-inch disk; brush with beaten egg and sprinkle evenly with pistachios and granulated sugar. Chill 30 minutes. Bake on a baking sheet until golden, about 1 hour (tent with foil if browning too quickly). Let cool completely on a wire rack; remove from pan. Cut into wedges; serve with sauce.