"Only" modifies the word it is nearest to.
In this case, it is near "vegetables" equally when it is placed before or after the word. So the meaning is the same.
If it said "Only he eats vegetables," that would mean that he is the only one who does this.
It is extremely common to see and hear "only" misplaced.
"He only eats vegetables" is almost universally used in mistake for "He eats vegetables only," but careful speakers and writers avoid this error.
Interested in Language