This easy strata can be a side dish at dinner or the star of brunch

Rich with cheese and filled with butternut squash and mushrooms, this breakfast casserole is worth waking up for. / Ryan Liebe/The New York Times

The basic formula for this breakfast casserole is extremely forgiving. As long as you keep the backbone of custard-soaked bread, you can embellish it however you wish: sausages, bacon, vegetables, herbs, different varieties of cheese, you name it.

For this strata, I went meatless, opting for a mix of browned, earthy mushrooms and gently sweet butternut squash. Then, I seasoned it all with sage, which works well with those wintry flavors, and added a pinch of red-pepper flakes to mimic a hot Italian sausage-like burn. For the cheese, I used a classic combination of mild, milky mozzarella and sharp Parmesan for lushness and depth.

Breakfast casserole recipes call for a variety of different breads, from feathery brioche to crusty sourdoughs. The lighter the bread, the more puffed and ethereal the casserole; the denser the bread, the heartier and richer. Here, I chose the middle ground: a simple baguette. But feel free to use whatever bread you have, as long as it's not too seedy, which can interfere with the creaminess.

Assemble it ahead, then bake it as your guests arrive, whether it's for breakfast, brunch or even a cozy dinner. Just rebrand it as a vegetable casserole and serve it as a side dish -- or make this gorgeous casserole the star.

Mushroom-Butternut Squash Strata

This golden-topped strata has a savory mushroom and butternut squash filling, which gives it a complex, earthy flavor. Mozzarella adds mild richness, while the Parmesan gives everything a hit of salt and depth. You'll need to let the strata sit in the fridge for at least eight hours (and preferably overnight) before baking. This allows the bread to soak up all the custard. Then, run it under the broiler after baking so the edges become crunchy and pleasingly singed. It's a lovely main dish for a celebratory brunch or meatless supper, or a hearty side dish with roast chicken or fish for dinner.

Yield: 8 to 10 servings

Total time: 1 1/2 hours, plus chilling

3 tablespoons extra-virgin olive oil

2 tablespoons unsalted butter, plus more for greasing the pan

1 pound mixed mushrooms, such as cremini, white, shiitake and oyster, cut into 1-inch chunks

Fine salt and freshly ground black pepper

1 cup chopped shallots (from 3 to 4 large shallots)

1 1/4 pounds butternut squash, peeled, seeded and grated (about 2 1/2 cups)

1 1/2 tablespoons chopped fresh sage

1/8 teaspoon red-pepper flakes, plus more as needed

8 large eggs

1 1/2 cups whole milk

3/4 cup heavy cream (or use 2 1/4 cups half-and-half instead of the milk and cream)

3/4 cup grated Parmesan

2 cups shredded mozzarella

12 ounces baguette, cut into 1-inch cubes (about 10 cups)

In a very large (12-inch) skillet (or in a Dutch oven), working in batches so as not to crowd the pan, heat 1 tablespoon oil and 1 tablespoon butter over high. Add mushrooms, and cook, stirring occasionally, until well browned, 7 to 10 minutes. Transfer to a large mixing bowl, and season lightly with salt and pepper.

In the same skillet (no need to clean), heat remaining 2 tablespoons oil and 1 tablespoon butter over medium-high. Add shallots and shredded squash, and cook, stirring, until shallots are golden brown and the squash is soft and cooked through, 15 to 20 minutes. (If the squash starts to stick to the pan, splash in a little water.) Stir in 1/2 teaspoon salt, sage and a pinch of red-pepper flakes. Transfer to the bowl with the mushrooms, tossing gently to combine.

Grease the bottom and sides of a broiler-safe 9- by 13-inch baking dish with butter.

In another large bowl, whisk eggs until uniform in color. Whisk in milk, cream, 1/4 cup of the Parmesan (save the rest for the top), 2 teaspoons salt, red-pepper flakes and a large pinch of black pepper. Whisk thoroughly to combine.

Stir in the mozzarella, about 2/3 of the squash- mushroom mixture and the bread cubes until well coated. Pour bread mixture into the prepared baking dish in an even layer. Strew the remaining squash-mushroom mixture over top. Refrigerate, covered, until the bread absorbs all the liquid, at least 8 hours or overnight.

When ready to bake, heat the oven to 350 degrees. Top the strata evenly with the remaining 1/2 cup Parmesan. Bake for 40 to 50 minutes, until set in the center. (It may puff a bit.) Run it under the broiler for 1 to 3 minutes to brown the top, watching carefully. Let sit for 10 minutes, then serve warm.

-- By Melissa Clark