Place spaghetti, tomatoes, onion, garlic, red pepper flakes, olive oil, salt, and water into a large pot.
Bring everything to a boil over high heat. Stir frequently to prevent the pasta from sticking.
Reduce heat and simmer until pasta is cooked and liquid has mostly absorbed, about 9–12 minutes.
Toss in fresh spinach and stir until just wilted.
Serve hot, topped with basil and Parmesan cheese.