Physical conditions of the molecular gas in metal-poor galaxies