How do I change what blocks show up on a user page depending on the user role of that page?
You need to expose that entity as a context to Drupal, then the visibility settings should automatically let you select between the current user and the user on the page.

Drupal core only does that for nodes at the moment, the logic for that is in \Drupal\node\ContextProvider\NodeRouteContext with its service definition:

node.node_route_context:
class: Drupal\node\ContextProvider\NodeRouteContext
arguments: ['@current_route_match']
tags:
  - { name: 'context_provider' }


So you need to duplicate that class and basically do a search and replace for node => user, remove the node.add part and put that in a custom module.