Preheat oven to 350°F (175°C) and line a baking sheet with parchment paper.
In a large bowl, whisk together oats, flour, sugars, salt, cinnamon, nutmeg, and baking soda.
In a separate bowl, mix butternut squash puree, melted butter, egg, and vanilla extract.
Combine wet and dry ingredients, stirring until fully incorporated.
Fold in walnuts and chocolate chips if using.
Scoop tablespoon-sized portions onto the prepared baking sheet, spacing them about 2 inches apart.
Bake for 12-15 minutes or until golden brown and set.
Let cookies cool on the baking sheet for 5 minutes before transferring to a wire rack.