You can freeze it. I have frozen plain pumpkin (not the pie version with spices) in ice-cube size portions. It makes a great treat for your dog, if you have a dog. But you can't use the one with spices, only pure pumpkin.
I'm not sure how long in the fridge. Personally I would toss it after about 4 days being open.