Put the butternut pumpkin, carrots, leeks and garlic in a flameproof casserole dish or large saucepan. Pour the pasta sauce and water or stock into the pan and add the sugar. Bring to the boil, stirring, then reduce the heat. Add the thyme and cook for 12–15 minutes until the vegetables are almost tender when pierced with the tip of a knife. Season to taste.
Meanwhile, preheat the oven to 200°C. For the gratin topping, melt the butter in a saucepan and stir in the breadcrumbs and chives. Remove the pan from the heat.
If you are not using a flameproof casserole dish, transfer the vegetables to an ovenproof dish. Spread the breadcrumb mixture over the vegetables and sprinkle the cheese evenly over the top. Bake for 20 minutes or until the gratin topping is crisp and golden.