Cook the pasta to al dente, according to package instructions. Drain, reserving 1 cup of the pasta cooking water.
Meanwhile, in a large non-stick skillet, heat the oil over high heat. Add the mushrooms and sauté until lightly browned, about 5 minutes. Transfer mushrooms to a plate and set aside.
Add the cauliflower to the same skillet and cook, stirring occasionally, until browned, about 5 minutes (work in two batches if necessary). Stir in the garlic and cook until fragrant, about 1 minute.
Add the tomato paste and cook, stirring constantly, about 1 minute. Stir in the wine, anchovies, and crushed red pepper. Cook until wine is reduced by half, for a couple of minutes. Season with salt and pepper.
Reduce the heat to medium. Add the spaghetti cooking water, then the spaghetti into the cauliflower mixture and gently toss. Cook until the sauce thickens, about 2 minutes. Off heat, stir in the mushrooms and Parmesan. Top with fresh basil leaves.
Notes
Replace anchovy fillets with 4 teaspoons of anchovy paste.
Omit anchovies for the vegetarian version
Replace parmesan with nutritional yeast for a vegan option.