Preheat broiler to high (500°F/260°C). Place onion halves and ginger cut-side up on a foil-lined baking sheet. Broil 10-15 minutes until deeply charred. Set aside.
In a dry stockpot over medium heat, toast star anise, cinnamon, cloves, coriander, and fennel seeds for 2-3 minutes until fragrant. Transfer spices to a spice bag.
Add vegetable broth, water, charred onion, ginger, spice bag, shiitake mushrooms, tamari, hoisin, and sugar to the pot. Bring to a boil, reduce heat, and simmer gently for 45-60 minutes.
Press tofu for 15 minutes to remove moisture, then slice into strips or cubes. Heat oil in a skillet over medium-high heat and cook tofu until golden on all sides, about 3-4 minutes per side. Set aside.
Soak rice noodles in boiling water for 8-10 minutes (or cook per package directions) until tender. Drain and rinse with cold water. Divide among serving bowls.
Strain broth through a fine-mesh strainer, discarding solids. Return strained broth to pot and season with additional tamari, salt, or sugar to taste.
Arrange bean sprouts, Thai basil, cilantro, mint, green onions, chili peppers, and lime wedges on a platter for serving.
Bring broth back to a rolling boil. Ladle hot broth over noodles and tofu in bowls. Top with garnishes and serve immediately with hoisin sauce and sriracha on the side.