Preheat the oven to 350 degrees Fahrenheit.
Heat a large pot of water over high heat until boiling then salt generously.
As the water comes to a boil, heat the oil in a large skillet set over medium heat. Add the onions and peppers and cook until softened.
Crumble and cook the beef in the same pan until browned, then drain out any excess fat.
Add the garlic, 1 teaspoon of Italian seasoning, 1 teaspoon of salt, ½ a teaspoon of pepper, and red chili flakes if using. Cook until fragrant, about 2 minutes. Add the pasta sauce and bring it to a gentle simmer before removing from the heat.
Boil the pasta until al dente (about two minutes less than the package instructions) then drain.
In a medium bowl, combine the sour cream, cream cheese, remaining teaspoon of Italian seasoning, ½ teaspoon of salt, and ½ teaspoon of pepper. Fold in 1 cup of the mozzarella and all the parmesan chees then set aside.
To assemble, evenly spread about 1 cup of the meat sauce into the bottom of a 9x13-inch casserole pan.
Toss the cooked spaghetti noodles into the remaining meat sauce then layer them on top of the meat sauce. Spread the cream cheese mixture in an even layer over the noodles, then sprinkle the remaining 2 cups of mozzarella on top.
Bake for 20-25 minutes or until the cheese is bubbling and the top turns golden. (If yours doesn’t brown after 25 minutes, turn the broiler to low and broil for 2-3 minutes or until golden.)