Dear Adrian,
Thanks for contacting Top China Travel!
I am not sure about the availability of buses from Guilin to Shanghai, you need to check this by yourself in the bus station in Guilin. But it is usually recommendec to take train to flight from Guilin to Shanghai, as it is around 1510 kilometers from Guilin to Shanghai.
Any further request or question, please feel free to contact with us.