Preheat the oven to 350°F (175°C).
Cook the spaghetti according to the package instructions until al dente. Drain and set aside.
In a skillet, heat the olive oil over medium heat. Add the sliced mushrooms and sauté until soft, about 5 minutes.
In a large mixing bowl, combine the cooked spaghetti, shredded chicken, sautéed mushrooms, chicken broth, heavy cream, garlic powder, onion powder, salt, black pepper, and dried thyme. Mix well.
If using, fold in the frozen peas.
Pour the mixture into a greased baking dish. Top with shredded cheddar cheese and sprinkle the breadcrumbs evenly on top.
Bake in the preheated oven for 25-30 minutes, or until the top is golden and bubbly.
Remove from the oven and let it sit for a few minutes. Garnish with chopped parsley, if desired.
Serve warm and enjoy!