Preheat the oven to 450°F with a rack positioned in the lower third of the oven. You don't want any other racks in the oven so that the pumpkin fits.
Toast the bread in a toaster or lay the bread on a baking sheet and set in the oven. Bake until lightly toasted on one side, about 7 minutes. Cut the bread into ½-inch cubes. Set aside.
Prepare the pumpkin: Either remove the top of the pumpkin by cutting around the stem with a paring knife. OR slice the top off the pumpkin with a large knife just under the stem. Don't throw away the top. Use a large sturdy spoon to scoop out the seeds. Season the inside of the pumpkin with ¼ teaspoon salt.
Whisk together the milk, stock, nutmeg, salt, pepper, and thyme (if using) in a bowl or measuring cup.
Place one layer of toasted bread cubes in the bottom of the pumpkin. You should be able to fit about 4 to 5 pieces. Cover with a handful of cheese (about 1/2 cup) and drizzle with about 1/4 cup milk mixture (just eyeball it). Keep layering with the bread, cheese, and milk mixture until the pumpkin is filled to the top, but not overflowing. You’ll end up with 3 to 4 layers of each (bread/cheese/milk).
Cover the pumpkin with the top and transfer to a small roasting pan or cast iron skillet. A pie plate is nice too. You can also use a foil-lined small sheet pan and then transfer it to a serving dish after it comes out of the oven. Rub the exterior of the pumpkin with olive oil. Bake until the pumpkin is tender, 1 to 1 1/2 hours, depending on its size. To test for doneness, remove the top of the pumpkin (use oven mitts) and pierce the pumpkin flesh with a knife. It should go in without resistance. The skin should be a beautiful burnished color.
Remove from the oven and serve immediately. I like to spoon the filling into bowls.