Whisk together the flour, baking powder and salt and keep at hand.
Working in a mixer fitted with the paddle attachment or in a bowl with a hand mixer, beat the butter and both sugars together on medium speed for about 3 minutes, or until smooth. Add the egg and beat another 2 minutes or so, scraping down the sides of the bowl as needed. The mixture may look curdled, but that's OK. Add vanilla and mix for about a minute more. Then reduce the mixer speed to low and add the dry ingredients in two or three additions, mixing only until they're fully incorporated into the dough.
Place a large sheet of plastic wrap or wax paper on your work surface and put half of the very soft and sticky dough in the center of the sheet. Cover with another piece of plastic or wax paper, then roll the dough into a circle just a little larger than 8 inches in diameter. As you're rolling, turn the dough over and lift the plastic or paper frequently, so that you don't roll it into the dough and form creases. Repeat with the other half of the dough.
Put the dough on a cutting board or baking sheet and refrigerate it for about 3 hours or for up to 3 days.
When you're ready to assemble and bake the gateau, center a rack in the oven and preheat the oven to 350°F Generously butter a 2-inch high, 8-inch round cake pan.
Remove the layers from the refrigerator and let them rest on the counter for a couple of minutes before peeling away the plastic or paper. Fit one layer into the pan. If it breaks, just press the pieces together. If there's a little extra dough running up the sides of the pan, you can either fold it over the bottom layer or cut it so that it's even. Spoon some of the jam or pastry cream onto the dough, starting in the center of the cake and leaving one inch of dough bare around the border. Add more filling if you don't think it will squish out the sides when you press down on it with the top layer of dough. (I find that 3/4 cup is usually just the right amount, but if you're using a very thick jam, you might want a bit more.).
Moisten the bare ring of dough with a little water and then top with the second piece of dough, pressing down around the edges to seal it. If you'd like, you can work your finger between the top dough and the edge of the pan, so that you tuck the dough under a little. Because of the softness of the dough and the baking powder, even if you only press the layers together very lightly, they'll fuse as they bake. And, no matter how well you press them together, it seems inevitable that a little of the filling will escape.
Brush the top of the dough with the egg glaze and use the tips of the tines of a fork to etch a cross-hatch pattern across the top.
Bake the cake for 40 to 45 minutes, or until the top is golden brown. Transfer the cake to a cooling rack and let it rest for 5 minutes before carefully running a blunt knife around the edges of the cake. Turn the cake over onto a cooling rack and then quickly and carefully invert it onto another rack so that it can cool to room temperature right side up.