Stir-fries cook very quickly: Be sure to have all the ingredients set up beside the stove. Serve with rice.
Bring a kettle of water to a rolling boil. Meanwhile, cut tofu into 1/2-inch cubes, and put into a bowl. Remove kettle from heat; when boiling subsides, pour water over tofu to cover. Let stand for 15 minutes, then drain in a sieve or colander. Transfer tofu to a bowl; set near stove. Measure out 1 1/3 cups water from kettle for sauce, and set next to tofu.
In a large wok or skillet, toast peppercorns over medium heat for 2 to 3 minutes, until richly fragrant and slightly darkened (you may see a wisp of smoke). Let cool, then pound with a mortar and pestle or grind in a spice grinder. Set aside.
Heat oil in wok or skillet over high heat. Add ground meat, stirring and mashing into small pieces, until crumbly and cooked through, about 2 minutes. Add ginger, chile flakes, black beans, and chile bean sauce. Cook for about 2 minutes, stirring constantly, until beef is reddish brown and oil is slightly red. Add sugar and soy sauce, stir to combine, and add tofu. Gently stir or give wok a shake to combine without breaking up tofu too much.
Pour in reserved water, and bring to a vigorous simmer. Cook until tofu absorbs flavors of sauce, about 3 minutes.
Taste sauce, and add a pinch of salt and a pinch of sugar, if needed. Add green onions; stir to combine. Stir in cornstarch, then add enough to mixture to thicken sauce. (Traditionally, the sauce should be more soupy than gravy-like.) Sprinkle in the ground peppercorns, give mixture one last stir, and transfer to a serving bowl. Serve immediately with rice.