An elegant brunch dish with lots of flavor!
Put oven racks in upper and lower thirds of oven and preheat oven to 450°F.
Butter a 2-quart shallow baking dish (about 2 inches deep). Whisk together eggs, milk, 3/4 teaspoon salt, and 1/4 teaspoon pepper until smooth, then whisk in cheese. Pour into baking dish. Bake in upper third of oven until puffed, golden, and set, about 20 minutes.
Meanwhile, toss together mushrooms, sweet potato, shallot, oil, and remaining 3/4 teaspoon salt and 1/4 teaspoon pepper in a 17- by 13- by 1-inch baking pan. Spread vegetables in an even layer, then roast in lower third of oven while eggs are baking, stirring twice after 10 minutes, until tender and golden brown, about 18 minutes.
Serve eggs with roasted vegetables spooned on top.