Students are required to report on FAFSA as untaxed income "money received, or paid on your behalf." This includes any gifts and would also include any 529 distributions for his benefit from you as a non-custodial parent, if you were the 529 account owner. Parents who are required to report financial information on FAFSA, unlike the student, do not have the same requirement to report as untaxed income "money received, or paid on your behalf."
Transferring the 529 ownership to your ex-wife, the custodial parent, muddies the water. If such a transfer is considered strictly a transfer to and for the benefit of your wife, I think a good argument could be made that the transfer would not need to be reported on FAFSA as untaxed income (although at the time of FAFSA filing any amount remaining in your ex-wife's possession would need to be reported under her assets). But in this case the explicit intention is that the transfer of the 529 account from your ownership to that of your wife is for the benefit of your son, and therefore it could be argued that the amount transferred needs to be reported on FAFSA as money received by him or paid on his behalf.
Two other things related specifically to the 529:
-Once ownership is transferred to your ex-wife, she can pretty much do anything she wants with the money. I presume that the trust factor here is pretty high.
-If you retain ownership of the 529 and the college finance situation allows you to wait until spring of your son's sophomore year before taking distributions for him, your use of the 529 for his benefit will never need to be reported on FAFSA as untaxed income that he has received. (This assumes that the academic progression will be conventional: starting freshman year in the fall and finishing in four regular academic years.)
Finally, a remark in general:
I understand your feeling of being "penalized" by your scrimping and saving for your son's education. But you need to realize that what you have done is give your son a world of options that most other kids headed to college do not have. Only a small number of elite colleges (the hardest to get admitted to) guarantee to meet the full demonstrated need of any student, even those who come from families where there was no scrimping or saving. At most schools a student who cannot afford to pay the full price with family money will be "gapped" with the school's need-based aid and will either have to find the required money from a source other than family or the school's institutional funds (for instance, outside scholarships), or simply pass up an offer of admission and look for less expensive options. To the extent that your diligent saving has reduced or eliminated this problem, you should feel satisfied and not penalized, and your son should be grateful. Also, the financial aid formulas are geared much more toward income than assets, so a big stash of savings accumulated over the years will only negatively impact financial aid so much.