In a medium bowl, whisk together flours, sugar, and salt. Whisk together egg yolks and milk in a separate bowl.
With a pastry blender cut butter pieces into the flour mixture until they are pea-sized bits. Add yolk mixture, start mixing with your hands to form a shaggy mass.
Turn onto a clean surface, gathering the dry bits with a bench scraper, knead by folding and turning, about 10 times. It will start to form a consistent dough as you work it. The trick is to avoid over-kneading so the butter still stays intact inside to create the layers in the pastry.
Divide into two equal pieces, and wrap in plastic. Chill the the fridge for at least 30 minutes before rolling. (You can chill the dough overnight.)
Make the filling right before you roll the dough. In a medium bowl, mix sugar and vanilla seeds with your hands, try to get the seeds evenly distributed. Add the rest of the ingredients and toss to get everything well incorporated.
Preheat oven to 425 F / 220 C. Roll out one portion of the dough to a 11 inch circle, rotating the dough and dusting flour as needed. Place into a 9 inch pie plate. Pour in filling. Roll the second dough into a 11 inch circle, cut out strips of about 3/4 inch wide, about 8-10 strips. Form lattice top, pinch the dough around the edge to seal. Use a paring knife to run around the edge to trim off overhang. If there's extra dough, cut out strips to make a braid or shapes to garnish the edges.
Brush egg wash and sprinkle coarse sugar on the top. Bake in preheated oven for 35 minutes. Lower heat to 325 F / 170 C and bake for 15 - 20 more minutes, until the filling is bubbly, and the pastry is golden brown. *If the pastry is getting dark too quick, tent with foil. Cool for at least 2 hours before cutting.