It is almost surely Les maitres du temps/Time Masters, an 80s Franco-Hungarian cartoon.
Boy abandoned on another planet
Check: the main plot is about a group of people who try to rescue a child, Piel, who found itself alone on a remote and dangerous planet (Perdide) after an accident
Gets attacked by birds who peck at his head
Check: the boy was severely injured on the head at some point, by some wasp-like aliens (more about this on the following spoiler part)
There's possibly some weird time loop involved - possibly he somehow grows up to become his own rescuer
Check (from wikipedia, emphasys mine):
[...] the planet is being transported through time by a bizarre race of aliens known only as the Masters of Time. Perdide and everything on it, including Piel, is sent back 60 years through time. The effect of time travel means that aboard the approaching Double Triangle 22, the starfield appears to go into flux, and the unprotected crew are knocked unconscious. They awake in a vast space-station [...]. The crew have been treated for exposure to the time-travel area, but Silbad is dying. Yula and Jad, telepathically, reveal how Piel was attacked again by the creatures which killed his mother, losing part of his skull before a passing spacefarer came to his rescue. Silbad, when first describing Perdide to Jaffar and Belle, had revealed a metal plate on his head to repair the damage of this attack, but never demonstrated explicit knowledge of Piel, his parents' death, or time travel. It is now obvious to Jaffar and Belle that Silbad and Piel are one and the same person at different points in their life.