Preheat oven to 200°C. Heat 1½ tbsp of olive oil in a large flameproof casserole dish, add sausages and cook, breaking up with a spoon for about 5 minutes or until browned. Add onion, carrot, celery, garlic, fennel seeds and chilli flakes, stir for about 3 minutes until just tender.
Add passata, canned tomatoes, stock, thyme, oregano and 200ml water, bring to a simmer.
Season to taste with freshly ground salt and pepper, stir in the pasta and cook, stirring occasionally for about 15 minutes until pasta is al dente. Remove from heat, stir in vinegar to combine.
Pour half the mixture into a large baking dish, dollop with half the ricotta and scatter with half the parmesan, repeat layering finishing with the cheeses. Bake until bubbling (8-10 minutes) and serve hot, scattered with extra herbs and parmesan and baby spinach salad.