Heat the vegetable oil in a large skillet or wok over medium-high heat. Add the eggplant pieces and stir-fry for about 5-7 minutes, or until they are tender and slightly browned. Remove the eggplant from the skillet and set aside.
In the same skillet, add the minced garlic and ginger. Stir-fry for about 30 seconds until fragrant.
In a small bowl, mix together the soy sauce, rice vinegar, sugar, and red pepper flakes (if using). Pour this mixture into the skillet and bring to a simmer.
Add the cooked eggplant back into the skillet. Stir to coat the eggplant in the sauce.
Gradually add the cornstarch mixture to the skillet, stirring constantly until the sauce thickens, about 1-2 minutes.
Remove from heat and garnish with sliced green onions. Serve hot over cooked rice.