There are three categories that a marriage can fall into: legal, valid, and sacramental.
Legal means that it meets the requirements of the civil state and is recognized to be a marriage by the state;
valid means that it is presumed by the Church to be a marriage;
sacramental means that the couple are baptized Christians who have received the sacrament of matrimony.
All that an annulment does is to declare that a marriage that was previously presumed to be valid and/or sacramental was not and the spouses are free to marry. It does not pass any judgment on the legal status of the marriage; the legal status of the marriage is determined by the civil state. Even marriages that the Church cannot recognize as valid or sacramental, it does presume to have been
legal.
At one time, in Catholic societies, the Church did use the term
illegitimate in regards to the status of children, mainly for the protection of the rights of inheritance in a Catholic society. Although the term is still in use for the purpose of determining the rights of succession in Catholic monarchies, for the most part it is no longer used because the term unjustly stigmatizes children who are innocent of the circumstances of their births. So long as both parties believe they are validly married at the time the children are born, the children are presumed by the Church to be the legitimate offspring of a putative (i.e., presumed valid) marriage.
As regards your initial question: Your friend is not considered illegitimate by the Church. If people indeed ask such an appalling question of him, he need only reply with a frosty stare and a cold shoulder, which is a polite way of demonstrating how cruel and vulgar he finds the question to be. He certainly need not defend the circumstances of his birth to anyone who does not have a legitimate need to know.
**Recommended reading:
Annulments and the Catholic Church** by Edward Peters