In a nonstick skillet over medium heat, combine pears, 4 tablespoons of butter, maple syrup, vanilla, and spices and cook until the pears are tender, 9 to 10 minutes. Add pumpkin and cook for 1 to 2 minutes. Remove from the heat. Place the flour, brown sugar, and remaining butter in a bowl. With your fingers, work the butter into the dry ingredients until large crumbs form. Add the walnuts and combine well.Heat oven to 375°. In a 9-by-13-inch baking dish, spread the pumpkin-pear mixture evenly on the bottom. Sprinkle the topping over it and bake until golden brown and bubbling, about 40 to 50 minutes. Serve warm.