Joining a server and hitting observe is never considered antag rolling if you are only connected to one server at a time.
If the second part of your question is asking if you can join as some role then quit if you’re having performance or connection issues without it being considered antag rolling, then it depends on how often you do it. We understand that sometimes things are outside of your control, like performance issues, will cause you to have to leave a round early so players are typically not penalized for leaving rounds early if it is infrequent.
If the second part of your question is just asking if you can join as a role after switching from a server that you were observing on, then yes you can absolutely do that.