Step 1 Make fresh pasta dough by pulsing the flour and olive oil in a food processor. Add the egg and pulse until the dough forms a ball that rides around on the top of the blade. Remove the dough from the food processor and knead until smooth and shiny; this should take only a minute or so. Wrap in plastic wrap and refrigerate at least 1 hour.
Step 2 Roll the pasta dough very thin, about a 6 setting on most machines, flouring as necessary. The sheets should be at least 4 inches wide. Cut the sheets into squares, dust lightly with flour and set aside until ready to use.
Step 3Heat 3 tablespoons butter in a skillet over medium-high heat. When the butter has foamed and subsided, add the cubed squash, 1 teaspoon chopped rosemary, one-half teaspoon minced shallots and salt to taste and cook, tossing occasionally, until the squash has lightly browned, about 5 minutes. Reduce the heat to medium, cover and cook until the squash is tender, about 5 more minutes. Using a slotted spoon, gently remove the squash from the pan to a medium bowl. Add the wine to the pan and cook over medium-high heat, scraping the browned bits from the pan and reducing the wine to a glaze, about 5 minutes. Add the squash back to the pan, and toss to coat with the glaze. Season generously with freshly ground black pepper and a light grating of fresh nutmeg. Set aside.
Step 4In a small bowl, beat together the ricotta, one-fourth teaspoon salt and one-half teaspoon minced shallots and freshly ground black pepper and a light grating of fresh nutmeg.
Step 5Cook four or five pasta sheets at a time in plenty of rapidly boiling salted water. The pasta will be done when the sheets float to the surface, 1 to 2 minutes. Remove from the boiling water and drain on a tea towel if using immediately or transfer to a large bowl of water to store. Repeat, using all of the pasta. (The dish can be prepared to this point several hours in advance. The squash can be held at room temperature or refrigerated; the ricotta should be refrigerated; and the cooked pasta sheets should be stored in a large bowl of water. Bring the ricotta to room temperature, warm the squash in a skillet over low heat, and drain the pasta sheets and pat them dry on a tea towel before using.)
Step 6Heat the oven to 350 degrees. Melt one-half cup butter in a skillet over medium heat with 1 teaspoon minced shallots and one-half teaspoon minced rosemary. When the butter is melted and fragrant, set it aside.
Step 7Place one pasta square on a heatproof plate and brush with the melted butter. Spoon one-fourth cup of ricotta in a low mound in the center. Arrange a loose mound of about one-third cup of cooked squash on top. Dust generously with grated Parmigiano-Reggiano. Place another pasta square on top of that and brush again with the melted butter. Scatter more squash cubes on top, and dust with another generous grating of Parmigiano-Reggiano. Repeat with three more plates.<