Make the crust: Preheat the oven to 375 degrees F. Roll out the pie dough into a 12-inch round on a lightly floured surface, then fit into a 9-inch pie dish. Fold the overhanging dough under itself and crimp the edges.
Place a piece of parchment paper in the pie crust and fill with dried beans or pie weights. Bake until the crust is starting to set and the edges are browning, about 20 minutes. Remove the parchment and beans and continue to bake until completely golden and crisp looking, another 5 minutes. (If the edges are getting too brown, cover them with some foil.) Let the crust cool completely.
Melt the bittersweet chocolate in a heatproof bowl set over a saucepan of simmering water. Using a pastry brush, paint the inside of the pie shell with the melted chocolate in a thin even layer. Set aside to harden.
Meanwhile, make the filling: Pour 2 cups milk into a heatproof bowl and set over the pan of simmering water. Heat until the milk is almost, but not quite, boiling. Add the unsweetened chocolate and stir until it?s completely melted. Set aside off the heat.
In a big bowl, whisk the sugar, cornstarch, flour and salt. Whisk in the remaining 1/2 cup milk, then stir into the hot chocolate-milk mixture. Return the double boiler to medium-high heat. Whisk in the egg yolks and cook, whisking constantly, until the mixture is very thick, about 20 minutes. Remove from the heat and stir in the butter and vanilla until smooth. Let the filling cool slightly, then pour into the pie shell. Place a piece of plastic wrap directly onto the surface of the filling and refrigerate until cold, about 3 hours or overnight.
Right before serving, make the whipped cream: Beat the mascarpone, sugar and vanilla seeds in a large bowl with a mixer until creamy. Add the heavy cream and continue to beat until it holds medium-stiff peaks.
Add the whipped cream to a pastry bag fitted with a large star tip and pipe generously on top of the pie. Sprinkle with shaved chocolate.