Place onions in a food processor; pulse until finely chopped. Add carrots; pulse until finely chopped.
Preheat oven to 350°.
Heat a large high-sided sauté pan over medium heat. Add oil to pan; swirl to coat. Add onion mixture; cook 4 minutes. Add garlic; cook 2 minutes. Add Italian seasoning, red pepper, and 1/4 teaspoon salt. Add beef; cook 5 minutes. Stir in stock, 4 tablespoons basil, tomato paste, vinegar, pasta, and tomatoes. Bring mixture to a boil; cook 13 minutes or until pasta is almost done, stirring frequently. Stir in remaining 1/4 teaspoon salt.
Arrange mozzarella over pasta mixture. Sprinkle with Parmigiano-Reggiano; bake at 350° for 15 minutes or until pasta is done. Sprinkle with remaining 2 tablespoons basil.