Earlier in the day or the day before, bring vinegar, sugar, salt, ginger, and garlic to a boil in a saucepan. Remove from heat and let steep 5 minutes.
Place vegetables in a large, shallow baking dish. Pour vinegar mixture through a strainer over vegetables and toss to coat; discard garlic and ginger. Cover with plastic wrap and refrigerate at least 3 hours or overnight, stirring occasionally.