The only way I know to have rematches is via the Elite Four and facing up against some old opponents.
You can fight Guzma on Melemele Island near the motel on route 2; after that, he’ll be on the beach in Hau’oli City.
In Heahea City you can battle Morimoto at the Game Freak office once per day.
There are more one-off battles post-game:
At the Aether Foundation you can battle Faba again, and win the Dubious Disc.
If you return to the school on MeleMele Island and defeat the Black Belt you can fight Principal Asuka.
You can access the rest of Poni Island where there are trainers to battle, but also you can battle Dexio to win Alakazite.
There is also the Looker episode with some trainers.