For the vegan pho broth:
Put onions, shallots, and ginger slices in the oven on broil (or the highest heat setting, if your oven does not broil), and cook until very browned.
Add the charred aromatics to a large pot, and add water most of the way to the top. Turn the heat to high.
Meanwhile, in a small, dry skillet, toast the cinnamon, coriander, fennel, anise, and cardamom over medium heat. As soon as the spices start to brown or become fragrant, transfer them directly to the pot with the onion and ginger (or into a spice bag/cheesecloth net, if you have that, and then into the pot).
When the mixture comes to a boil, reduce it to a simmer. Cook for about two hours, stirring occasionally, until you can taste the flavours infused into the broth and it is reduced by a couple of inches.
Stir in the nutritional yeast, soy sauce, and coconut sugar. Allow a minute or two for the sugar to dissolve. Taste the broth for seasoning and add more soy sauce or table salt, and sugar, as desired. Turn off the heat.
For the vegan spaghetti squash pho:
Add several large handfuls of spaghetti squash “noodles” to a soup bowl. Ladle a generous helping of vegan pho broth over the squash. Squeeze some lime juice onto the broth and then add all of the garnishes (or mix and match by preference).
Store any leftover broth, squash, and garnishes separately.