How important is the foreign language recommendation for Harvard?

This really depends on the other things that you do that might make you an interesting candidate. https://college.harvard.edu/admissions/application-process/what-we-look
http://thechoice.blogs.nytimes.com/2009/09/10/harvarddean-part1/?_r=0

Are you applying to Harvard solely on the basis of academic performance for instance?

Your guidance counselor can write a note with your transcript that the school no longer offered Spanish 4H.

If not taking AP Spanish allows you to focus on classes or activities that you are interested in, then as a candidate for “holistic” admissions, you may be fine. You can always call and ask if it makes you feel better. I think you should do what you want to do regardless of Harvard, honestly…Have a great senior year.

Taking language the first year at Harvard is no big deal, and many students do.