Preheat oven to 375°F (190°C). Grease a 9x13-inch baking dish.
Heat olive oil in a large skillet over medium-high heat. Add chicken pieces and cook until browned on all sides, about 5-7 minutes. Remove chicken and set aside.
In the same skillet, add onion and cook until softened, about 3 minutes. Add garlic and cook for 1 minute more.
Sprinkle flour over the onion mixture and stir for 1 minute. Gradually whisk in chicken broth and heavy cream. Add thyme, salt, and pepper. Cook, stirring constantly, until sauce thickens, about 3-4 minutes.
Layer half of the potato slices in the prepared baking dish. Top with half of the chicken, then half of the sauce. Repeat layers with remaining potatoes, chicken, and sauce.
Cover with foil and bake for 40 minutes. Remove foil, sprinkle with cheddar and Parmesan cheeses, and bake uncovered for an additional 15 minutes, until bubbly and golden.
Let rest for 5 minutes, then garnish with parsley before serving.
Tips
For a lighter version, substitute half-and-half for heavy cream.
This casserole can be assembled a day ahead and refrigerated; add 10 minutes to baking time.