It could be pain, and if medicated, it could then be the drugs.
If the heart is undersized, the question is whether that is normal, or if that is from a different process, where the fluids in the body are not properly controlled by hormones and/or transmitters. This is sometimes seen in dogs with Addison's, but they should also see that the pulmonary vasculature (I think I have those names right) would also be not normal.
Chronic infection can make him pant more, such as a tick disease, or some of the diseases that we may not have tests for - may depend where he was before. Would be interesting to see his bloodwork.
I will say that I had a shepherd that had some issues like this. Ultrasounds, echocardiograms, xrays, blood tests, we never found out exactly what it was. I did find that this product helped the most: http://gaiaherbs.com/products/detail/5/Adrenal-Health-
We had no explanation for why it helped, but we guessed it was either hormonal or a neurotransmitter.