Gather and prepare all ingredients. Preheat the oven to 375°F and grease a 9x10 casserole dish with nonstick cooking spray and set aside.
Bring a medium-sized pot of water to a boil to cook the pasta. Once boiling, add the pasta and cook for about 10 minutes, or just until tender. Drain and cool the pasta in a colander, then set aside for later.
While the pasta is cooking, in a large skillet over medium heat, add the oil, onions, and mushrooms. Cook for 5 minutes, stirring occasionally, until the onions soften.
Push the onions and mushrooms to one side of the skillet. Melt the butter in the skillet, then sprinkle in the flour and cook for 1 minute.
Add the chicken broth, salt, pepper, garlic powder, and dried thyme, and cook until it’s thickened, about 1-2 minutes.
Next, add the milk and whisk until the liquid has thickened and become smooth, about 2 minutes.
Add the ham and peas to the skillet and fold to combine.
Add the cooked spaghetti noodles and fold until combined. (If your skillet is too small, place everything in a large bowl to combine.)
Transfer the mixture into the 9x10 casserole dish and spread evenly.
Top evenly with the cheddar cheese. Bake, uncovered, in the oven for 25-30 minutes.
*I like to use Better Than Bouillon to make broths to keep costs low.**I love utilizing leftover baked ham in this recipe, but you can also use smoked boneless ham that was fully cooked, ham steaks, or cooked honey-baked ham.***Cheddar can be less common for ham tetrazzini, but that's how I grew up with my mom making it. You can also use mozzarella or Parmesan.