Heat oil in a medium saucepan over medium heat. Add onion and season with salt and pepper. Cook, stirring occasionally until onion has softened, about 10 minutes.
Add pears, apple cider vinegar, brown sugar, rosemary and ginger. Continue to cook until the pears are soft, adding a splash of water if pan begins to become dry, stirring occasionally for about 20 minutes.
Season with salt and pepper to taste. Serve warm or cooled completely.