
Bring a large pot of salted water to a boil and add spaghetti. Cook according to package directions until al dente. Drain, reserving about ½ cup of the water.
While pasta is cooking, heat olive oil in a large skillet over medium heat. Add onion and cook for about 5 minutes, until starting to soften. Stir in red pepper flakes and garlic; cook for an additional 3 minutes.
Add tomatoes, oregano, salt, and pepper. Cook for 5-7 minutes, stirring occasionally, until tomatoes soften.
Use a potato masher to crush tomatoes slightly. Add drained spaghetti to skillet with sauce, along with parmesan and basil. Toss to coat, adding reserved pasta water as needed.
Serve topped with additional parmesan, basil, and red pepper flakes.