Use a 3-4 pound pumpkin or squash or cut off a 3-4 pound section of a larger squash. Cut in half and scrape out any strings and seeds from inside. Cut into pieces no bigger than 2 inches thick.
Place in a steamer basket fitted into a large pan over about an inch of water. Cover and steam until squash is tender when poked with a knife, from 20-30 minutes depending on size. Remove from heat and allow to stand, covered, until cool enough to handle. (You can also steam it in a pressure cooker or Instant Pot; the time will depend on the thickness of the squash. Start with 5 minutes at high pressure and allow pressure to naturally release. If your pumpkin is very thick, cook under pressure for 8-10 minutes.)
Once the pumpkin/squash is cool, peel each piece with a sharp knife.
Preheat oven to 400F and prepare a medium-sized casserole dish by lining with parchment paper or rubbing with a couple of drops of oil.
Place the dates in a food processor, and pulse until they are well-chopped. Add the peeled pumpkin, and blend well. Add all remaining ingredients except raisins and blend.
Taste the mixture. If it is not sweet enough to your taste, add your choice of sweetener until it is to your liking. If you are not watching sugar intake, brown sugar or maple syrup are delicious. If you want a low-sugar version, stevia is a good natural sweetener. (I used three tiny scoops of stevia.) Once it is sweetened to taste, pour it into the prepared casserole, stir in the raisins, and smooth the top.
Bake until water has evaporated and top is browned, about 40 minutes if you did not add a liquid sweetener. Sprinkle with toasted walnuts, if desired. Serve warm or chilled.
Nutritional data includes walnuts. If you leave them out, the fat is only .88 per serving.