Heat a large skillet over medium heat. Add olive oil, then add onion, carrot and celery. Cook until slightly caramelized, about 6-8 minutes. Add garlic and rosemary. Add the sausage and cook until brown, breaking up the sausage as it cooks. Next add the red wine and cook until reduced, then add the tomatoes, chili flakes and vinegar. Bring to a low simmer and cook for 30-45 minutes. Taste and season with salt and freshly ground pepper. Turn off heat and set aside to cool a bit.
While the sauce is simmering, cook the pasta. Drain and reserve 1 cup pasta water. Preheat oven to 375 degree.
In a large 3 quart baking dish, combine the sauce and pasta, stirring to coat. If too thick, add 1/2 cup pasta water. Add the small cubes of mozzarella and stir together. Sprinkle the top with Parmiagiano and rosemary. Bake for 20-30 minutes until the top is golden and bubbling. Garnish with parsley. Serve 6-8.
You can make this dish one day ahead and refrigerate. Take out 1-2 hours before cooking then continue with topping and bake as listed above.