Heat the oven to 375°F / 190°C. Grease a 9x13 inch / 23x33 cm baking dish with a little butter.
Halve the 4 pears lengthwise and scoop out the core with a melon baller or small spoon, leaving a shallow well in each half.
Arrange the pear halves cut side up in the baking dish in a single layer, without crowding.
In a mixing bowl, whisk together the melted butter, maple syrup, brown sugar, cinnamon, nutmeg, lemon juice, and salt until smooth.
Brush or spoon the butter-maple mixture generously over the pear halves, letting some pool in the cored centers.
Scatter the oats or pecans over the pears now if using.
Bake for 25 to 30 minutes, basting once with the pan juices at the 15-minute mark, until a paring knife slides into the thickest part with almost no resistance.
Broil for 1 to 2 minutes for deeper caramelization if you like, watching closely since the sugar glaze burns fast.
Let the pears rest for 5 minutes, then spoon the pan juices over the top. Serve warm with vanilla ice cream.