One option seems to be write a TCP server program for Linux and have it basically just forward all data to/from the UART connected to the PIC32. I’m guessing that you don’t want it to be totally insecure, so then you need to deal with authentication and encryption which will take a decent amount of effort to get right.
You could use ssh to take care of the authentication/encryption side of things and then just run a command over ssh to deal with the serial port.
Maybe the PIC32 is logging continuously though and you want to retain those logs even if there is no client connected to receive the logs. In that case, it seems like you want to have a continuously running process in Linux that interacts with the serial port and then also allow client(s) to connect periodically to send commands or read logs.
It really depends on what you’re trying to achieve.