Pack onion, fresno and carrots into a 1-qt. heatproof jar or a nonreactive container. Toast peppercorn and allspice berries in a dry large saucepan over medium heat, tossing constantly, until just fragrant, about 2 minutes. Add vinegar, sugar, salt and bring to a boil, stirring to dissolve sugar and salt. Remove from heat and stir in bay leaf, oregano, lemon zest, lemon juice, and garlic. Let cool slightly, then pour brine over onion, fresno and carrots to submerge. Seal jar and chill at least 3 hours before serving. The flavor will mellow as it sits.
Do Ahead: Vegetables can be pickled 3 weeks ahead. Keep chilled.