Heat a large skillet over medium heat and add the butter. When the butter has melted, add the leeks, then sprinkle with salt and pepper and cook, stirring occasionally, until soft and golden brown around the edges, 8 to 10 minutes. Set aside.
Preheat the oven to 450 degrees F.
Unroll the two pie crusts and lay on a sheet pan so that the pieces overlap slightly. Trim the edges of the pastry where it rides up the sides of the sheet pan and press these trimmings into the bare areas so that you are left with a 10-by-16-inch pastry rectangle.
Sprinkle over the fontina, leaving a 1-inch border, then top with the leeks. Dollop on the ricotta. Scatter the thyme and asparagus pieces over the ricotta and sprinkle with salt and pepper. Fold the uncovered pastry edge inwards to make a 1/2-inch border all the way around the tart, in the style of a galette.
Whisk the egg with a splash of water in a small bowl. Brush it all around the pastry edge.
Bake the tart until it is a deep golden brown, 15 to 18 minutes. (If the crust is browning too fast, reduce the heat to 425 degrees F.)
Remove the tart from the oven, then allow it to sit for 5 minutes. Cut into pieces and serve.