Cook pasta in a large pan of salted, boiling water until al dente. Drain well.
Meanwhile, heat oil in a medium sized pan on medium-high heat. Cook onion, garlic and celery for 3-4 minutes until softened. Add beef and cook until browned, breaking up lumps with a spoon. Add sweet potato and zucchini. Cook for 2 minutes until softened slightly.
Add tomato paste, tinned tomatoes, stock and thyme. Simmer, uncovered for 15-20 minutes until thickened slightly. Stir through cherry tomatoes and spinach leaves until wilted.
Meanwhile, preheat oven to 220 degrees (200 degrees fan-forced).
Combine pasta and beef mixture in an 8-cup capacity ovenproof dish. Sprinkle with ricotta, parmesan and pine nuts. Bake for 15-20 minutes until golden.