Bring a large pot of salted water to a boil. Add the spaghetti and cook according to the package instructions until al dente. Drain and set aside.
While the spaghetti is cooking, heat 1 tablespoon of olive oil in a large skillet over medium heat. Add the sausages and cook until browned on all sides and cooked through, about 10-12 minutes. Remove from the skillet and set aside. Once cool enough to handle, slice the sausages into bite-sized pieces.
In the same skillet, add the remaining tablespoon of olive oil. Sauté the chopped onion until soft and translucent, about 5 minutes. Add the minced garlic and cook for another minute until fragrant.
Pour in the crushed tomatoes, oregano, basil, red pepper flakes (if using), salt, and pepper. Bring the mixture to a simmer and let it cook for about 20 minutes, allowing the flavors to meld together.
Add the sliced sausages back into the sauce and simmer for as long as possible (1.5 - 2 hours) Toss the cooked spaghetti with the sauce until well-coated. Serve hot, garnished with fresh basil leaves and grated Parmesan cheese.