Spain and Ireland were among the top nations investing the most in the U.S. last year, according to data published by the U.S. Department of Commerce.