Put the olives in an 8-inch square nonreactive baking pan. Squeeze the juice from the lemon quarters over the olives and add the lemon quarters to the pan, along with the lemon juice, olive oil, garlic, fennel seeds, oregano, red pepper flakes, and rosemary. Stir until well combined. Bake for 30 minutes.