Preheat the oven to 425 degrees F. Brush a shallow 3-quart baking dish with olive oil. Bring a large pot of salted water to a boil. Add the pasta and cook until very al dente; you still want it to retain a little bite. Reserve 1/2 cup pasta water. 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; 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 each 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. Let sit 10 minutes before serving.