Soak the dried flat rice noodles in lukewarm water for 20 to 25 minutes until pliable but still firm. Drain, rinse briefly with cold water, and toss with a few drops of oil if not using immediately.
In a small bowl, combine the tamarind paste, fish sauce, palm sugar, and oyster sauce. Stir until the sugar is fully dissolved and taste to adjust the balance of sour, salty, and sweet.
Thinly slice the chicken against the grain and marinate in soy sauce and sesame oil for at least 10 minutes at room temperature.
Mince the garlic, slice the shallots, cut the green onions, cube the tofu if using, lightly beat the eggs, and measure out the bean sprouts and peanuts for garnish.
Heat the wok over high heat until almost smoking. Add half the oil, then stir-fry the garlic and shallots for 30 seconds until fragrant. Add the marinated chicken in a single layer, let it sear for 1-2 minutes, then stir-fry until cooked through and golden. Push to one side.
Add a splash more oil to the empty side of the wok, pour in the beaten eggs, and let them set for 20-30 seconds before scrambling until just cooked and still soft. Fold the eggs into the chicken mixture.
Add the drained noodles to the wok and pour the Pad Thai sauce over them. Using tongs or chopsticks, toss everything together quickly for 2-3 minutes until the noodles are tender and have absorbed the sauce. Add water in small amounts if the noodles are sticking.
Add the bean sprouts and the white bottoms of the green onions, toss for 30-45 seconds until just heated through, then remove from heat immediately to keep the sprouts crisp.
Divide the Pad Thai between bowls and top generously with chopped peanuts, green onion tops, fresh cilantro, and chili flakes. Serve immediately with lime wedges on the side for squeezing over the noodles.