Preheat the oven to 400 degrees F.
1 pound asparagus, trimmed
Fill a large bowl with ice water. Bring about 1 inch of water to a boil in a large skillet. Add the asparagus; cook until bright green and crisp-tender, 2 to 5 minutes, depending on the thickness of the asparagus. Drain and transfer to the ice water to stop the cooking; drain and pat dry.
1 sheet frozen puff pastry (about 1/2 pound), thawed
All-purpose flour, for dusting
Roll out the puff pastry into a 10-by-16-inch rectangle on a floured surface. Transfer to a parchment-lined baking sheet and prick all over with a fork. Bake until light golden brown, about 12 minutes. Let cool slightly on the baking sheet.
1 cup grated fontina cheese (about 3 ounces)
1 cup grated gruyere cheese (about 3 ounces)
1 tablespoon minced shallot
2 large egg yolks
3 tablespoons whole milk
1/8 teaspoon freshly grated nutmeg
Coarse salt and freshly ground pepper
2 teaspoons olive oil
1/2 teaspoon finely grated lemon zest
Meanwhile, mix the cheese, shallot, egg yolks, milk, nutmeg and a pinch each of salt and pepper in a bowl until combined. Spread the cheese mixture evenly over the puff pastry, leaving a 1-inch border on all sides. Toss the asparagus with the olive oil, 1/4 teaspoon salt, and pepper to taste. Arrange the asparagus on the tart and bake until the cheese mixture is slightly puffy, 15 to 20 minutes. Sprinkle with the lemon zest. Serve warm or at room temperature.