An annulment has no effect on the legitimacy of the children, any more than a divorce does. It affects only the religious aspect of the marriage.
Oh, I couldn't agree with you more that secular divorce has no baring on the "status",shall we say, of children born of that union. I wonder,re: the religious angle. Why I say this is b/c with an annulment a marriage -- in the eyes of the Church -- is declared null and void the off spring of that union are considered to be born out of wedlock. Illegitimate, IOW. 'Course I could be -- and probably am -- hopelessly out of date. BTW, even Henry VIII's divorces did not make his children illegitimate. IIRC, Henry did not divorce his first wife, Catherine of Aagon. The marriage was annuled on the grounds that it violated Levitius and that's why he had no male heirs, etc. etc.
He had to make separate declarations of illegitimacy, which he did as the new self-appointed "head of the church." Since Elizabeth's mother was beheaded, there was no divorce, but he declared her illegitimate anyway. In my opinion, she never got over it. Again, I wouldn't agree with you more.
True, Henry's first marriage was declared invalid on Levitical grounds. But Mary was also declared illegitimate in a separate act (I don't recall whether it was by Act of Parliament or Royal Assent - but in those days it really didn't make any difference, "Si veut le roi, si veut la loi.")
I'm a newly-minted Catholic, but from a historical point of view it's always been my understanding that an annulment has no effect on the legitimacy of the issue of the marriage. IOW the marriage took place, it just had no sacramental effect.