Preheat the oven to 350F(180C).
Cut the pumpkin or butternut squash into smaller pieces, removing the seeds. Place them on a parchment-lined baking tray. Bake for about 20-30 minutes, or until tender.
After it has baked, let it cool a bit. Remove the skin and either use a food processor or hand blender to puree the piece.
Split open the vanilla bean and scrape the seeds.
In a saucepan, combine the puree, honey, spices, vanilla bean and seeds, and salt (If using vanilla extract, add it to the jam at the end when it's off the heat.) Cook on medium heat until it starts boiling, then turn down the heat to low and let it cook uncovered or partially covered for about an hour. Make sure to stir once in a while, so it doesn't stick to the bottom or burn. At this point, you can taste it and add more spices or honey/sugar if you'd like.
When ready, take it off the heat, stir, and let it rest for about 15-20 minutes. Remove the vanilla bean or add vanilla extract if using. Then transfer to a jar or use as desired. You can keep the jam well sealed in the fridge for up to a month, or you can use any of the canning methods you like to save it for a longer time.