Bring a large pot of salted water to a boil. Add pasta shells and cook until just tender.
For the filling, heat olive oil in a large frying pan set over medium heat. Add onions and saute until soft, 4 to 5 minutes. Add garlic and saute for additional 30 seconds.
Turn up the heat to medium-high. Add the ground beef and cook, breaking up with wooden spoon, until beef is cooked through. Put a lid on top (slightly askew) and pour any accumulated juice out of the pan. Transfer ground beef mixture to a large bowl.
Stir in spinach and sun dried tomatoes until combined.
Place the cottage cheese in the bowl of a food processor or blender and puree until smooth.
Allow the beef mixture to cool, then stir in cottage cheese, dried chile flakes and basil. Season with salt and pepper to taste.
Fill each shell with 2 tablespoons of the beef mixture.
Prepare a 9- by 13-inch baking pan by spreading 1 cup tomato sauce on the bottom. Arrange pasta shells, opening-side up, in the pan. Spread additional 2 cups tomato sauce on top, and sprinkle with grated Parmesan cheese.
Cover with foil and bake for 20 minutes. Remove foil and bake for additional 5 minutes, or until cheese is melted. Remove from oven and let cool for 10 minutes before serving.