You can make the pasta dough either in a stand mixer or by hand.
To use a stand mixer, fit it with the whisk attachment and whisk the eggs together to break them up, then add the melted chocolate and whisk to break up again. The mixture won’t be smooth, but don’t worry. Whisk in 1½ cups of the flour on medium speed until blended, then switch to the dough hook attachment. Add the remaining 1 cup flour and mix on medium-low speed until a smooth ball of dough forms around the hook, adding more flour if necessary. Mix on low speed to knead the dough for about 3 minutes. When the dough is smooth and firm, wrap it in plastic wrap and let it rest in the refrigerator for at least 1 hour.
To make the pasta dough by hand, put the flour in a bowl and make a well in the center. In a separate bowl, whisk together the eggs and the melted chocolate to break them up. Pour the egg mixture into the well. Use a fork to incorporate the flour into the egg, bit by bit. When most of the flour has been incorporated, knead the dough, adding more flour as needed, until it’s smooth and firm, 10 to 15 minutes. Wrap the dough in plastic wrap and let it rest in the refrigerator for at least 1 hour. To make the filling, in a small sauté pan over medium heat, heat the olive oil. Add the shallots and sauté until soft and translucent, about 2 minutes. In a medium bowl, thoroughly combine the cooked shallots, ricotta, pumpkin, salt, cinnamon, allspice, and cloves. Set the filling aside.
To make the ravioli, line a baking sheet with parchment paper and set aside. Cut a slice of the pasta dough and flour it well. Using a pasta machine, roll it into a thin sheet. Cut the sheet across into rectangles about 2 inches wide and 5 inches long. Place 2 teaspoons of filling about ¾ inch from one end of each rectangle. Lightly brush water around the filling, then fold the dough to enclose the filling. Press to seal the edges. Fill the ravioli quickly, before the dough dries out. Set the filled ravioli on the prepared baking sheet. Repeat with the remaining dough. When you’ve filled the baking sheet, cover the filled ravioli with another sheet of parchment paper, and set the next batch of finished ravioli on top. Refrigerate or freeze the ravioli until you’re ready to cook them.
To make the sauce, bring a large pot of salted water to a boil for the ravioli. While it’s coming to the boil, melt the butter in a medium saucepan over medium heat. Continue cooking the butter until the milk solids have turned brown and the butter is caramel-colored and smells nutty. Turn off the heat and add the pear and sage. Stir to combine the ingredients and stop the butter from cooking. Season with salt to taste. Cover the pan and set aside to keep the sauce warm while you cook the ravioli. Boil the ravioli in batches until tender, about 10 minutes and drain.
Top ravioli with the sauce and sprinkle with the hazelnuts, cocoa nibs, and some cheese. Serve immediately.