Having had pleurisy long ago following pneumonia x 2, presenting as nasty pain in the lower ribs area with every breathtaken but especially when coughing. I, too, did the shallow breathing thing. Coughed so hard during the second bout that I cracked cartilage, and that's what made me think the ribs bones were broken. My doc strapped me, but some won't. What helped as well was walking or sitting holding a large, soft bed pillow wrapped around the ribs. (By the way, this also helped after gallbladder surgery.) For sleeping would wrap it around the rib cage.
Hope you find out what it is,