Pre-heat oven to 350 degrees then spread the hazelnuts you want to use in a single layer on a baking sheet. Bake for 14 minutes, In 7 minutes stir the nuts so they toast evenly while checking on the progress.
When hazelnuts are cool put in the center of a towel and pull corners of the towel together and roll hazelnuts around with some force till skins come loose. A small amount of skin will remain on the nuts and that is fine.
Sometimes I separate the ones that the skins didn’t come off back in the oven for a few more minutes. In a food processor, grind hazelnuts into a fine crumble and set aside.
Wash and dry the sage then pick the leaves off the stems and measure.
Preheat oven to 375°F and place walnuts on a baking sheet
Roast walnuts until they start to brown and smell toasted about 7 to 10 minutes
Make sure and check them frequently so they don’t burn.
Make pesto by putting all ingredient in a food processor, puree and set aside.
Potatoes, Squash and Cheese Sauce
Grate cheeses. Mix 1 cup each of gruyère and pecorino, put in a bowl and set aside.
Mix the remaining 1/2 cup gruyère, 1/4 cup pecorino and hazelnuts together then set aside.
Slice potatoes into thin slices (about 1/8-inch thick). Add potatoes to a pot and cover with water then bring to a boil, continue to boil for 2 minutes. Drain potatoes in a colander, rinse with cold water.
Peel squash and cut the neck into 1/8 inch round slices, if you need more then the top of the squash provides you can use the bottom, cut in half and scoop out the seeds then thinly slice. Lay the slices in one layer on a dish towel. Put 1/2 teaspoon of salt in the palm of your hand and sprinkle a little on all the squash slices to remove excess water. Let sit for at least 15 minutes. You will amazed at how much water comes out. Dry them with a kitchen towel or a paper towel. Set aside.
Mince onion and garlic, add olive oil, onion and garlic to a large heavy saucepan. Sauté over medium-low heat stirring until the onion is soft, transparent and the garlic starts to turn golden (about 10 – 12 minutes).
Add wine and reduce to a syrup.
Add butter and salt to onions. When butter is melted, add flour and continue stirring for about 2 minutes.
Slowly add milk a little at a time (this is important) while whisking constantly. Bring liquid to a boil, continuing to stir then reduce to simmer. Add cheese a little at a time, stir until the cheese is completely melted. Add pesto mixing in completely. Cook until sauce thickens.
Set aside 1 cup of sauce to make sure you have enough for the top two layers.
Assemble - Spread a thin layer of sauce in a 2 1/2 to 3 quart casserole dish. Layer potatoes (if you have some that are thicker than 1/8 inch place them on the outside and the thinner pieces in the middle) then spread a thin coat of sauce over the potatoes, layer squash and repeat until the last two layers. With the 1 cup of sauce you set aside, pour half over second to the last layer then add the last layer and pour the rest of the sauce over the top.
Bake uncovered 1 hour on the middle shelf. (I put a baking sheet below to catch any juices that overflow)
Check after 45 minutes and push down the top potato slices with a spoon to let the juices cover potatoes again.
Mix remaining cheese and the ground hazelnuts together then sprinkle over potatoes. Bake uncovered for 15 - 20 minutes or until top is brown and bubbly.
(You can put some foil on top if you don’t want it any darker on top.)
Let slightly cool before serving.