Heat oven to 425° F. Toss the carrots, beets, onions, oil, rosemary, 1 1/2 teaspoons salt, and 1/2 teaspoon pepper on 2 large rimmed baking sheets. Bake, tossing once, until browned and tender, 30 to 35 min.