Drain tofu and slice horizontally into 1/4-inch slices. Lay paper towels on a cutting board, place tofu slices on top, and cover with another layer of paper towels. Place something heavy, such as a cast iron skillet, on top. Allow to drain for 1 to 2 hours.
Preheat oven to 450 degrees F (230 degrees C). Place spaghetti squash, cut-side up, on a baking sheet.
Bake spaghetti squash in preheated oven until tender, 45 to 50 minutes. Remove squash from oven; remove and separate strands from peel using a fork.
Heat 2 tablespoons sesame oil in wok or large skillet over medium-high heat. Add eggs, cook and stir until eggs are cooked through and scrambles, about 5 minutes. Transfer eggs to a plate.
Cut each slice of tofu into 9 triangles and place in a bowl; add cornstarch and toss to coat. Shake tofu to remove excess cornstarch.
Heat remaining 4 tablespoons sesame oil in wok over medium-high heat; add tofu and saute until crispy, about 5 minutes. Remove from wok. Place squash, bean sprouts, Pad Thai sauce, garlic chile paste, and onions into wok and saute until heated through, about 10 minutes. Mix tofu and scrambled eggs into squash mixture. Remove wok from heat, add cashews, and toss to combine.