Oxford has been ranked as one of the least affordable cities in the UK for median earners looking to rent by a new study.