Preheat oven to 425°F. Place a large sheet of foil on a rimmed baking sheet. Place chestnuts, flat side down, on a work surface. Using a utility knife or a sharp paring knife, carefully cut through the shell on the rounded side of each chestnut to score an X. Soak in a bowl of hot water for 1 minute (this helps them steam while roasting). Drain chestnuts and pat dry; place in a medium bowl. Add rosemary, butter, 2 teaspoons salt, and nutmeg. Season with pepper and toss to thoroughly coat. Arrange chestnuts in a single layer in center of foil (a few might overlap) and gather up edges of foil around chestnuts, leaving a large opening on top. Roast until the peel begins to curl up and chestnuts are cooked through, 30-45 minutes, depending on size and age of nuts. Transfer chestnuts to a platter, using a spatula to scrape in any butter and spices with them, and toss to coat. Season with more salt, if desired. Serve hot or warm.