Meanwhile, make the filling: Heat the oil in a large skillet over medium heat. Add the shallots and 1 cup water. Cook, stirring occasionally, until the liquid has evaporated and the shallots start to brown, about 20 minutes. Add 1 tablespoon butter and 1 teaspoon sugar. Cook, stirring, until glazed, about 3 minutes; season with salt and pepper and set aside.
Heat the remaining 2 tablespoons butter in a large saucepan over medium-high heat. Add the carrots, parsnips, celery root and remaining 1 teaspoon sugar. Cook, stirring, until the vegetables start to soften, about 3 minutes. Sprinkle in the flour and 1/2 teaspoon each salt and pepper. Cook, stirring, 2 minutes. Gradually stir in the heavy cream and 1 cup water until smooth. Tie the thyme sprigs and bay leaves together with kitchen twine; add to the pan. Reduce the heat to medium and simmer, stirring occasionally, until the vegetables are tender and the liquid is thick, about 15 minutes. Let cool to room temperature. Discard the herb bundle. Stir in the lemon zest and juice, scallions and parsley.
Position a rack in the upper third of the oven and preheat to 400 degrees F. Spread the shallots evenly over the crust in the baking dish, then add the root vegetable filling in an even layer. Cover with the prepared top crust; use kitchen scissors to trim the excess pastry so there is a 1-inch overhang. Pinch the 2 crusts together, then fold the overhanging dough under itself. Chill 20 minutes.
Brush the top crust with the beaten egg. Score decoratively with a paring knife, being careful not to pierce completely through; poke a few vents in the crust to allow steam to escape. Bake until the crust is golden brown, about 40 minutes. Let stand 10 minutes before serving.