When watching a Heroes of the Storm replay is there a way to hide team chat?
There is no in game method of hiding the chat.
Note this has been suggested on the official forums for over a year with no response.
However the replay files are parse-able which means you could edit the file to remove all the chat with an empty chat and that way the chat will be removed from the replay and therefore will not show up when viewing the replay.
The third party site hotslogs allows you to upload your replay files and it gives you a link to the uploaded replay (so you can share it) with the chat removed.