I've made a couple of these recently and have mentioned them as an afterthought here on the blog and on Facebook. And people have been fascinated by them, so I feel obligated to put all the answers in one place.
Before I go any further, everything here involves the small pie pumpkins, smaller than a volleyball. Do not use big pumpkins for this. Buy a couple of pumpkins, because some will have thick walls (good, but holds less custard) and some will have thin walls (bad, easier to collapse), and it's hard to tell from the outside.
Back when I was a wee lad, Jeff Smith (The Frugal Gourmet) wrote about baking a whole pumpkin with custard, and that it was one of George Washington's favorite dishes. Of course, the only reference for that factoid is Jeff Smith, so take that as you will. Smith's recipe involves cooking the custard and the pumpkin together at the same time. I think this is a bad idea, because you've got a shell that will eventually fall apart and a custard that might not set in time. I prefer to bake the shell until just tender enough, and then pour the cooked custard inside. You'll get a little additional cooking as the gourd cools, but you don't have to worry about it all collapsing in an orange mess. Always bake in a pie tin and keep it in there until serving, just to be safe. It can be squishy by the end, and the bottom tends to get soft.
For the regular pumpkin I made a few weeks ago, I just used a little salt inside the cavity. Last weekend, I decided to use a spice blend I had on hand. The Wines of Chile folks sent along eight bottles of Carménère along with two curry blends. The one marked Tandoori had a hint of cinnamon and clove, and I thought it would be fun with the pumpkin, and I wanted a nice aromatic custard. I made one for the tasting and did a second attempt a few days later for the gathering of the wine bloggers.
Neither of the curry ones worked out perfectly, and most people reacted with "interesting, but no". For one, the spice had more of a hot chili kick than I expected, and it only showed up on the aftertaste. Also, you really have to like the flavor of cooked, unsweetened pumpkin, and not have adverse reactions from opening baby food jars in the middle of the night.
I dusted the interior of the pumpkin with the spice and roasted it. Meanwhile, I incorporated it and a bit of buttermilk into my custard, just enough to tinge it yellow and make it flavorful. My earlier, purely sweet custard was scented with Chinese five spice powder, which was incredible but would have been a jarring contrast with the curried pumpkin walls.
Even though none of these were huge successes, I love experimenting with flavor combinations, and you can't deny that these are a lot of fun to make and look really adorable on the table. And if you just make a plain vanilla custard, anybody who doesn't like the pumpkin can just spoon from the center. Which is what happened to pumpkin #1 that got mysteriously drained of all custard one night. I blame Wolfie.
P.S. Also check out my 2007 post on carbonada criolla, an Argentine stew that involves meat, fruit, and vegetables baked in a pumpkin.