Heat olive oil and cook onion, then add garlic and mushrooms. Cook uncovered until moisture evaporates and vegetables brown before salting. Start heating pasta water separately.
Stir in cooked lentils and cook briefly. Add salt, soy sauce, balsamic vinegar, black pepper and crushed red pepper. Cook until browned with no excess liquid.
Stir in tomato sauce and a splash of water used to rinse the jar. Simmer about 15 minutes, stirring occasionally. Add optional basil and simmer gently while pasta finishes.
Salt boiling pasta water and cook pasta according to package directions. Drain and serve topped with bolognese.