Smeargle can learn every move *except* for Transform, Scald, and Brine. When attempting to learn any of the three moves it instead is assigned a random move.
Transform is exclusive to Ditto for obvious reasons. Scald and Brine are the two "truest" legacy moves, in that they were previously distributed to Pokemon (Poliwhirl and Omanyte respectively) and no longer are.
Beyond these three, Smeargle can learn any move in game. This includes community day exclusives like Blast Burn and Meteor Mash.