To make the artichoke cashew cheese, place the cashew nuts in a blender along with the artichokes, nutritional yeast, salt, ground black pepper, and enough water to make a smooth paste.
Blend into a very smooth consistency. Set aside.
Heat the olive oil and saute the sliced onions until they turn translucent, about five minutes.
Add the garlic and stir-fry a few seconds.
Add the mushrooms and saute until they are tender, another five minutes.
Season with salt and pepper. Turn off the heat and add the spaghetti along with 1/4 cup of the pasta cooking water. Add the artichoke cheese and stir well to mix everything.
Pour the spaghetti into a gratin dish or baking dish. Sprinkle another 1/4 cup of the pasta cooking liquid over the spaghetti.
Sprinkle the breadcrumbs on top. Place under a medium-hot broiler for 10 minutes or until the breadcrumbs are golden brown.