Cut the tops off the garlic heads, drizzle with olive oil, wrap in foil, and roast at 400°F until soft and golden. This gives the dish its signature sweet, mellow garlic flavor. Once cooled, squeeze the cloves out and set aside.
Bring salted water to a boil and cook the farfalle until al dente. Drain and toss with olive oil to prevent sticking while you prepare the rest of the dish.
In a skillet, cook the chopped bacon until crispy, then set it aside. Add the chicken to the same skillet, season it, and cook until browned and tender.
In the same skillet, cook the minced onions and sliced mushrooms until softened and golden. This builds the savory base of the sauce. Remove and place with the chicken mixture.
Pour white wine (or stock) into the pan to deglaze, scraping up flavorful browned bits. Reduce slightly, then mash in half the roasted garlic. Whisk cornstarch into the milk, pour it in, and add Parmesan along with the remaining roasted garlic. Simmer until thickened.
Add the bacon, chicken, onions, mushrooms, peas, and sun-dried tomatoes into the sauce. Stir in the cooked pasta and mix everything gently until well combined. Adjust seasonings as needed.