Pulse flour, salt, and butter in a food processor into pea-size crumbles. Add water; pulse until dough comes together. Roll dough into a disk and wrap in plastic wrap; chill 1 hour.
On a lightly floured surface, roll dough into a 12" round. Fit into a 9" pie plate. Trim edges and crimp; chill for 30 minutes.
Heat oven to 375°. Using a fork, prick the dough all over. Line dough with parchment paper and fill with pie weights or dried beans; bake until golden, about 20 minutes. Remove paper and weights and bake until cooked through, about 5 minutes more; let cool.
Beat sugar, cornstarch, salt, and egg yolks in a bowl and set aside. Heat milk over medium-high heat until bubbles form around the edge. Slowly add in egg mixture, whisking constantly until thick, 4–5 minutes. Remove from heat and add in chocolate and vanilla; stir until chocolate has melted and incorporated. Pour into prepared pie shell and cover with plastic wrap directly on the surface; refrigerate until firm, 4–6 hours.
Whip cream until stiff peaks form. Remove plastic wrap from pie and cover with whipped cream and chocolate shavings.