In a dry pan over medium heat, toast the star anise, shaking the pan frequently, until fragrant, about 5 minutes. Transfer to a plate. Add the fennel seeds to the hot pan and toast, shaking continually, until fragrant and a little darker, about 3 minutes. Cool on a plate, then grind both spices in a clean spice or coffee grinder to medium-fine. Transfer the spices to a small bowl and mix in the cloves, cinnamon, and pepper.
Using a sharp paring knife, score the skin of the duck with a slight surface cut in a crisscross pattern 1⁄2 inch apart to help render the fat and allow seasoning to penetrate. Rub and coat the duck with the salt, five-spice seasoning, and olive oil. Refrigerate until use, ideally at least 3 hours.
Heat a cast-iron skillet over high heat. Set the duck skin-side up in the skillet and sear for 1 minute. Reduce the heat to low and cook skin-side down to render the skin until nearly all the fat has been rendered and you're left with a crispy, thin layer of skin, about 9 minutes. Turn over and cook until duck breasts are medium rare, 4 to 5 minutes longer. Transfer to a plate and let the duck rest for 7 minutes, then cut into thin slices, drizzle lightly with olive oil, sprinkle with flaky salt, and serve.