When a player joins the server, this command block (containing
gamemode 2 @a) puts them into gamemode 2/adventure mode. How can I change this so that only non-admin/not "opped" players' gamemode gets changed?
I don't think there's an automatic way to differentiate admins. But since the number of admins should be low, you can just tag them all manually using:
/tag <name> add admin
Then you replace the command in your command block with:
/gamemode adventure @a[tag=!admin]
Also, an improvement: If you click the button in the command block GUI saying Impulse twice, it changes to Repeat and the command block turns blue. Then click on Needs redstone to change it to Always active and you can just remove the redstone clock next to it. The command block will continue to run, take immediate effect and produce less lag.
And lastly, you can improve performance further by restricting the number of affected players to only the ones that are in the default gamemode of the server. If that's for example Survival mode, you can use:
/gamemode adventure @a[tag=!admin,gamemode=survival]