Gather the ingredients.
Preheat the oven to 375 F. Spray a 13- x 9-inch glass baking dish with nonstick cooking spray and set aside.
In a large saucepan, melt the butter over medium heat. Add the onion and garlic and sauté until tender, about 4 to 5 minutes.
Stir in the Alfredo sauce, cream cheese, and heavy cream, and bring to a simmer over medium low heat.
Add the cheddar or Havarti cheese and stir until the mixture is melted and smooth. Remove the saucepan from the heat.
Bring a large pot of salted water to a boil. Add the spaghetti and cook until al dente, according to package directions.
Meanwhile, combine the eggs and light cream in a large bowl and mix well using a wire whisk until blended.
Place the frozen peas in a colander in the sink. When the spaghetti is cooked, drain it into the colander over the peas.
Immediately stir the pasta and peas into the egg mixture in the bowl until coated.
Stir the coated pasta and peas into the sauce mixture in the saucepan along with 1/2 cup of the Parmesan cheese and the bacon.
Pour this mixture into the prepared casserole dish and top with the remaining Parmesan cheese.
Bake the casserole for 30 to 40 minutes or until the mixture is set and top begins to brown.
Cut into squares to serve.