Preheat the oven to 400°F. Mist a 2 to 2 1/2-quart rectangular or oval baking dish with nonstick cooking spray.
Bring a large pot of salted water to a boil. Add the penne and cook according to package directions for al dente.
While the pasta cooks, heat the oil in a medium pot set over medium heat. Add the fennel seeds and garlic and cook until aromatic, about 2 minutes. Add the tomatoes, basil sprig, 1 teaspoon salt and 1/4 teaspoon pepper. Simmer, lowering the heat if the sauce bubbles too vigorously, until the sauce has thickened slightly, the flavors have blended together and the raw tomato taste has cooked out, 10 to 15 minutes. Remove from the heat, discard the basil and season with additional salt and pepper. Pour over the cooked pasta and toss well to coat. Add the cubed mozzarella and transfer half the pasta to the prepared baking dish.
Put the cottage cheese in the bowl of a food processor and process until smooth. Add the shredded mozzarella and Parmesan and pulse two to three times. Combine half the cottage cheese mixture with the spinach and mix to break up the spinach. Drop in spoonfuls over the pasta in the baking dish. Top the spinach layer with the rest of the pasta and then the remaining cottage cheese mixture.
Bake until bubbly and golden brown on top, about 30 minutes. Let stand for 10 minutes, and then scatter the torn basil over the top.