PREHEAT THE OVEN to 425°F. Brush a shallow 3-quart baking dish with olive oil. Bring a large pot of salted water to a boil. Cook the pasta until very al dente; you still want it to retain a little bite. Drain well.
Meanwhile, in a large Dutch oven over medium-high heat, add the olive oil. When the oil is hot, add the sausage and cook and crumble with a wooden spoon until no longer pink, about 4 minutes. Add the onion and fennel and cook until softened, about 10 minutes. Add the garlic and red pepper flakes and cook until the garlic is fragrant, about 1 minute. Add the tomatoes and season with salt. Bring to a simmer and add the cream; if the sauce is too thick, add a little water from the pasta. Turn up the heat to medium high and simmer rapidly to thicken the sauce and blend the flavors, about 10 minutes.
Add the rigatoni and basil and toss to coat the pasta with the sauce. Remove from the heat and stir in half of the mozzarella and Parmesan. Transfer the mixture to the prepared baking dish and sprinkle with the remaining mozzarella and Parmesan. Bake until browned and bubbly, 15 to 20 minutes.