They used to always advise against using pressure treated woods for raised beds, because they used to use arsenic in the pressure treatment. Since then, they changed the forumulation and took the arsenic out and there's a lot less concern about it. But that was talking about raised bed timbers anyway, where the whole inside surface would be buried in soil. For your trellises, only the little legs will be in the dirt, so I don't think there's any concern. If you really wanted to be super purist, you could wrap the legs where they go into the soil with foil or plastic, but I don't think there's anything to worry about.
But I think a lot of wooden trellises are cedar, which is naturally rot resistant and isn't treated. Or you could get the PVC-vinyl ones that look like painted wood but last for ever. Or metal, like powder-coated steel.