I am not convinced that there would be a causative link between the legality, or moral nature of the practice and the taste (see however, Mennell on Food and the Quantum Theory of Taboos).
I am worried though that the question here is recursive or at the very least ambiguous. The word “they” here is not completely clear in its associated subject. Does “they” correspond to the person being eaten, or is it asking whether a person who lived on a diet of vegans/vegetarians or omnivores would themselves taste different?
I am going to suspect however that it is a question of the taste of the flesh of the vegan/vegetarian or omnivore for simplicity’s sake. It is said (although I haven’t found blind studies on it) that grass-fed versus corn-fed cows do taste substantially different. However, in this case it is a massive difference in diet, as this is essentially two diets which are completely different from one another. The other issue is that the two cows are likely to live in conditions which are not otherwise identical, and therefore whether it is the grass, or the act of grazing which makes a difference is hard to tell. For farm animals therefore there seems to be a difference, and it is also said that carnivorous animals have a distinctly different taste. It is likely that there are enough differences in metabolic processes and muscle-types in carnivorous animals than plant-eaters that this makes up some of the difference, and not just the food intake itself.
However, for most vegans/vegetarians and omnivores, I would suspect that a large part of their diet is likely to overlap, and the protein content of an omnivore’s diet tends to be a relatively small percentage. It may be however that someone on a keto/paleo diet may have a sufficiently different intake of food that you would be able to tell them apart from a vegan in a blind taste test.
Lactose on its own can cause some change in body odour. This appears to be somewhat rare, but certainly there are metabolic processes which occur in the break-down of dairy products.
Overall, it seems that there may be some difference, but it would most likely only be particularly noticeable between those whose diet is made up in large part by dairy and/or meat.