xpeng motors secures $500m funding amid ev market challenges