Roast the onions and garlic: Heat oven to 400°F. In a large baking dish, toss the sliced onions with 2 tablespoons olive oil, salt and pepper. Drizzle the garlic halves with a little oil, wrap them together in foil and place them in the dish. Roast for 25 minutes, stirring the onions halfway through.
Add the chicken: Season the chicken with the remaining olive oil, salt, pepper, Italian seasoning and red pepper flakes. Nestle it among the onions. Return to the oven for 20-25 minutes, or until the thickest part of the chicken reaches 165°F. The onions should be soft and golden and the garlic very soft. If needed, remove the cooked chicken and give the onions and garlic a little more time.
Cook the pasta: While the chicken bakes, cook the pasta in salted water until al dente. Reserve 1 cup pasta water before draining.
Make the sauce: Remove the chicken and shred it with two forks. Once the garlic is cool enough to handle, squeeze the roasted cloves out of their skins into the baking dish. Mash them into the onions, then stir in the cream, Parmesan and ½ cup pasta water.
Toss and serve: Add the shredded chicken and cooked pasta to the dish and toss everything together. Add more pasta water as needed to loosen the sauce. Taste for salt and pepper, then finish with parsley and more Parmesan.
