Bring a large pot of lightly salted water to a boil. Cook pasta in boiling water until al dente-about 8-9 minutes; drain.
Meanwhile, heat olive oil in a large frypan over medium-high heat; add onion and garlic, and cook until golden brown. Mix in tomatoes, mushrooms and spinach. Season with salt, pepper and chilli flakes. Cook 2 minutes more, until tomatoes are heated through and spinach is wilted.
Reduce heat to medium, stir in pasta and feta cheese, and cook until heated through.