Cook the pasta: In a large pot, bring plenty of salted water to a boil. Add the anelletti and cook for about 5 minutes less than the cooking time indicated on the package, as they will finish cooking in the oven. Drain and set aside.
Prepare the sauce: In a large skillet, heat the extra virgin olive oil over medium heat. Add the chopped onion and minced garlic and sauté until the onion becomes translucent. Add the ground meat and cook until browned. Stir in the tomato purée, season with salt and pepper to taste, and let it simmer for about 15-20 minutes, stirring occasionally.
Combine the pasta and mozzarella: In a large bowl, mix the cooked anelletti with the meat sauce and diced mozzarella. Make sure the pasta is well coated.
Prepare the baking dish: Preheat the oven to 180°C (350°F). Pour the anelletti mixture into a baking dish and level the surface. Sprinkle with grated Parmesan cheese.
Bake in the oven: Bake for about 25-30 minutes, or until the top is golden and crispy.
Serve: Remove the baked anelletti from the oven and let it rest for a few minutes. Garnish with fresh basil and serve hot.