Heat the oil in a deep frying pan over a medium heat and fry the onions for 10 minutes until soft. Stir in the garlic and ginger, and fry for another 2 minutes. Add the spices and toast for a few seconds until fragrant, then stir in the chickpeas, squash, harissa and stock. Cover and simmer for 25-30 minutes or until the squash is tender. Stir in the spinach, season well and cook for 5 minutes until the spinach has wilted and the sauce has thickened. Remove from the heat and leave to cool.