Very marginal if at at all. Believe me especially by middle school and older, everyone knows who is poor, who is rich, who is a slut, who is religious, who is a jock, etc. And there are other ways, e.g. everyone has a swipe card or number code to "pay" for their lunch and you never know who's on the free lunch program or not.
I've never heard of a school giving free lunch by default, though. Maybe in areas where 99% of the kids would qualify anyway?
Even if it doesn't increase kids' knowledge, it still draws attention to it (both to peers and the kid themself) and provides an opportunity for bullying.