Fears that substandard homes are putting people at risk as sweltering temperatures in the UK hit more than 30C