The company had planned to invest up to $500 million in Uruguay, but cited high energy prices and regulatory hurdles as reasons for its pullout.