hi friend
.5 cm difference in leg lngth does not be the cause /contributing factor for you current problem
have you ever been evaluated by a physio for your back problem.i suggest you to go to a physio specialized in musculoskeletal conditions.it will be great if he is familiar with the movement impairment based approach.
the problem can be due to ant minor alterations occuring while you are doing dead lift ,deep squats etc.