Vegetable Pastitsio. (Renee Comet/For The Washington Post; styling by Bonnie S. Benwick)

Pastitsio is a hearty Greek casserole of layered pasta, ground lamb or beef with tomato sauce, and a topping of cream or custard. This vegetable version, with sauteed cubes of eggplant and cooked lentils standing in for the lamb, is every bit as hearty — and tasty — as the traditional kind.

It does, however, take a little while to prepare. That said, you can make all the parts ahead of time, layer them in the baking dish and park it all in the refrigerator for a day or two. (In fact, the taste of the eggplant-lentil filling will improve as it sits.) Then just pop the dish in the oven about half an hour before dinner.

The quick and creamy sauce used here is based on something that’s found in a variety of Greek dishes, including moussaka. But this one does not call for any egg yolk, and it has feta stirred in. Before you add the milk, be sure to first cook the butter-flour mixture long enough to lose any raw flour taste. If there are a few small bits of the salty cheese that don’t quite melt, don’t worry — they will smooth out while the pastitsio bakes in the oven.

When you buy eggplants at the supermarket, be sure the ones you choose are firm and smooth. Eggplants that have been sitting around tend to be not only bruised and soft, but bitter as well. Keep your eyes peeled for the smaller guys, which have fewer seeds than their big kin, and are not as bitter. And on the chance that your family doesn’t love eggplant, you can simply substitute sliced mushrooms, sauteing them in oil as you would the eggplant cubes.

I have simplified the recipe by using cooked lentils, but it’s easy enough to cook them from dried; see the NOTE, below.

Vegetable Pastitsio

6 to 8 servings

Serve with steamed sliced carrots tossed with oil and fresh herbs, a green salad and crusty country bread.

INGREDIENTS

¼ cup extra-virgin olive oil

1 medium onion, finely chopped (1 cup)

2 teaspoons minced garlic (from 2 medium cloves)

12 ounces small eggplant, peeled and cut into ½ -inch pieces

One 14.5-ounce can crushed tomatoes, preferably fire-roasted (1½ cups)

½ cup dry red wine

½ cup water

2 tablespoons chopped fresh oregano

¼ teaspoon ground cayenne pepper

About 2½ cups cooked brown lentils (may substitute canned/rinsed white beans or kidney beans; see NOTE)

Kosher salt

4 tablespoons (½ stick) unsalted butter

¼ cup flour

2 cups whole milk

4 ounces feta cheese

⅛ teaspoon freshly grated nutmeg

6 ounces dried elbow macaroni

1 ounce freshly grated Parmigiano-Reggiano cheese

STEPS

Heat half the oil in a large skillet over medium heat. Once the oil shimmers, add the onion and cook for about 5 minutes. Add the garlic and cook for 1 minute, stirring, until fragrant. Increase the heat to medium-high; add the remaining oil and then the eggplant; cook for about 5 minutes, stirring occasionally, until the eggplant starts to turn golden.

Increase the heat to high; add the crushed tomatoes, red wine, the water, oregano and cayenne; once the mixture comes to a boil, reduce the heat to medium-low and cook for 5 minutes, stirring occasionally, then stir in the cooked lentils. Taste, and season with salt, as needed. Turn off the heat.

Preheat the oven to 350 degrees. Use cooking oil spray to grease a 9-inch square baking dish with sides at least 2 inches tall. Bring a large pot of lightly salted water to a boil over medium-high heat.

Melt the butter in a medium saucepan over medium-low heat. Add the flour; cook for 3 minutes, whisking. Gradually add the milk, whisking. Increase the heat to medium-high just to bring to a boil, while whisking, then reduce the heat to medium-low and cook, whisking occasionally, for 5 minutes, to form a thickened sauce. Add the feta and nutmeg and cook, stirring until well incorporated.

Add the macaroni to the boiling water; cook according to the package directions, until al dente. Drain and transfer half the pasta to the baking dish, spreading it to cover the bottom. Spoon half of the eggplant-lentil mixture evenly over the pasta, then scatter one-third of the grated cheese over the top. Repeat with the remaining pasta, eggplant-lentil mixture and half the remaining Parmigiano-Reggiano.

Pour the feta cream sauce over the top, spreading it in an even layer. Scatter the remaining cheese over the surface. Bake (middle rack) 20 to 25 minutes or until bubbling around the edges.

If desired, brown the top of the pastitsio under the broiler before serving.

NOTE: To cook lentils from dried, combine 1 cup of them with 4 cups water and ½ teaspoon kosher salt in a medium saucepan over medium-high heat; once the water comes to a boil, reduce the heat to medium-low, partially cover and cook for 15 to 20 minutes, until just tender. But start checking them after 12 minutes, because they can go from perfectly done to mush in no time at all (and they will cook further in the casserole). Drain in a colander.

NUTRITIONAL ANALYSIS | Per serving 410 calories, 14 g protein, 43 g carbohydrates, 20 g fat, 9 g saturated fat, 35 mg cholesterol, 430 mg sodium, 6 g fiber, 7 g sugar

Tested by Bonnie S. Benwick; email questions to food@washpost.com

To view or scale this recipe online, go to washingtonpost.com/recipes .

For stories, features such as Date Lab, Gene Weingarten and more, visit WP Magazine. Follow the Magazine on Twitter. Like us on Facebook. Email us at wpmagazine@washpost.com.

Moulton is the host of “Sara’s Weeknight Meals,” a public television show now in its seventh season. She writes a weekly column for the Associated Press and is the author of four cookbooks, including, most recently, “Sara Moulton’s Home Cooking 101: How to Make Everything Taste Better.”