Place a pan with broth over medium heat and bring it to a simmer. Allow to continue at a simmer, lowering the heat if necessary.
Meanwhile, add olive oil to a separate pot over medium-high heat. Add onions and cook for about 5 minutes, until softened and translucent. Add garlic and cook for an additional 30 seconds.
Stir in the dry, uncooked rice until coated. Add the wine, cooking until all of the wine evaporates.
Reduce heat to medium. Add a ladle full of the simmering stock and stir. Add the nutmeg, salt, and pepper. Once the stock has mostly been absorbed by the rice, add another ladle full and stir. After this is absorbed, repeat until most of the liquid has been absorbed. Add final ladle full of stock.
Reduce heat to low and stir in the pumpkin and the parmesan, if using. Serve. Risotto should be creamy. The rice should be tender with some chew to it.