Cook the pasta according to the package directions.
Heat the olive oil in a skillet over medium-high heat. Add the chicken pieces in a single layer and sprinkle with salt and pepper. Allow to cook, without stirring, until golden, about 2 minutes. Stir the chicken around to brown it on all sides. Remove to a plate.
In the same skillet over medium-high heat, add the garlic and onions and stir immediately to start cooking. Cook until the onions are deep golden, stirring occasionally, 2 to 3 minutes.
Reduce the heat to low and pour in the marinara sauce, red pepper flakes and 1/2 cup water. Stir until the onions and garlic are mixed in, then add the chicken back to the skillet. Add the parsley and stir to combine. Bring to a simmer and cook, stirring occasionally, for 7 to 8 minutes.
Make sure the sauce is bubbly and very hot, then gently stir in the mozzarella. Let sit, undisturbed, until you can see that the mozzarella is very soft, 2 to 3 minutes.
Drain the pasta and pour it onto a platter. Drizzle with a little olive oil. Immediately sprinkle on the Parmesan shavings. Pour on the sauce, sprinkle with grated Parmesan and the chiffonade of basil and serve immediately!
The mozzarella should be very soft, but should still be in visible chunks rather than distributed throughout the sauce. It's better for the chunks to be on the firm side than the falling-apart side! You can always heat it a little more to get the cheese to the consistency you want.