Preheat the oven to 375°F.
Cook the spaghetti al dente according to the package directions, then rinse and drain it.
Warm the olive oil in a large pot over medium-high heat. Cook the onion until softened, add the garlic, and cook until fragrant.
Lower the heat and stir in the milk, cream cheese, cream of chicken soup, salt, and pepper until the cream cheese melts into a smooth sauce.
Toss the spaghetti with the sauce and transfer it to a baking dish.
Top with the mozzarella, cheddar, and bacon.
Cover with foil and bake for 20 minutes.
Remove the foil and bake for 10 minutes more, broiling for the final 5 minutes while watching closely.
Serve warm with parsley if desired.