Preheat oven to 375 degrees. On a work surface, cut pumpkin in half lengthwise. Scoop out seeds; discard. Transfer to a parchment-lined baking sheet. Drizzle olive oil evenly over insides of pumpkin halves; rub 1/2 teaspoon brown sugar into each. Roast, cut-side down, until pumpkin is easily pierced with a paring knife, about 1 hour. Let cool.
When cool enough to handle, scoop out flesh with a spoon. You'll need 1 1/2 cups of puree. Transfer flesh to a clean kitchen towel or cheesecloth; wring excess liquid into a bowl. Place flesh in the bowl of a food processor, along with egg, Locatelli, amaretti, ricotta, shallot, and a pinch of nutmeg; process until smooth. Season with salt and pepper.
Lay 1 pasta sheet on work surface. Place 1 tablespoon filling every 3 inches. Brush water around filling. Place another sheet on top, pressing around filling to seal. Using a fluted pastry wheel, cut each ravioli into a 3-by-3-inch square. Repeat with remaining pasta sheets and filling. Transfer ravioli to a parchment-lined baking sheet sprinkled with semolina; freeze for at least 30 minutes.
Bring a large pot of water to a boil; season with salt. Add ravioli; cook until it just floats, 3 to 4 minutes.
In a large saute pan, melt butter over high heat. Add sage; cook until butter begins to brown and sizzle, about 1 minute. Remove pan from heat; whisk in balsamic. Using a slotted spoon, transfer ravioli to pan, tossing to combine. Serve immediately with cheese, if desired.