Back ache

Recently bought my first road bike after coming from a hybrid. Love the new bike however, I've experienced some back ache after rides (which has eased since flipping the stem). I'm 5'6.5" and ride a small Giant Contend. Man in the shop suggested a medium for stack height however, reach was too long and could barley standover it without touching TT so went for the small. Is this just my body getting used to the new position or did I go for the wrong frame size?
0
Posts
Easty commuter
Tripster AT
2020 Voodoo Marasa
2017 Cube Attain GTC Pro Disc 2016
2016 Voodoo Wazoo