Heat the oil in a heavy-bottomed saucepan. Add the onion, celery, pumpkin or squash and carrot and cook until the vegetables have some colour. Add a splash of water and some seasoning, then cover the pan and let the vegetables cook over a very low heat for 5 mins.
Add the garlic and cook for another couple of mins, then add the tomato purée, stock, mixed grains, parmesan rinds, if using, and some seasoning. Simmer for about 15 mins (or until the grains are cooked), adding the beans for the final 5 mins. In the last few mins, add the spinach, then taste for seasoning.
If you want to use sage, fry the leaves whole in a little olive oil before adding to the soup. If you prefer to use parsley, you can just add it directly to the soup. Serve with shavings of parmesan and a drizzle of extra virgin olive oil on top of each bowlful. Remove the parmesan rinds and serve.