Preheat oven to 400°F Slice a thin piece off both ends of the squash, including the stem. Cut the squash in half crosswise (perpendicular to the ribs). Scoop out the seeds with a sturdy spoon.
Line a pan in which the squash can fit snugly with foil or parchment paper. If you use foil, rub with butter to prevent squash from sticking.
Set the squash halves in the prepared baking pan and smear the flesh with the softened butter. Sprinkle with the salt.
Drizzle maple syrup over the cut edge of the squash and into the cavity (most of the liquid will pool there) and sprinkle with the ginger, if using.
Roast the squash halves until nicely browned and very tender when pierced with a fork, about 1 hour and 15 minutes for a small to medium squash (larger squash may take longer); add the pecans, if using, for the last 10 minutes of cooking. Do not undercook. Serve warm with a spoon.