There is nothing inherent to ads that makes it universally something to avoid. Different people have different priorities for their ideal engineering job (num of users reached, power within the team, liking the product, liking the actual technical work, etc). I know people who loved working in ads: some of them didn't care a ton about the product they worked on, but loved the challenge of their technical work, and some who truly found the world of ads itself to be interesting. This set of priorities isn't necessarily something you'll realize immediately out of school; I was happy for a while with the technical challenge of the work I was doing in ads, but after a while I realized that my personal preference prioritized the actual product I was shipping higher than I thought, so I switched to something I was more excited about.
Don't listen to anyone stupid enough to tell you that there's any universal rule about jobs in ads being crappy (much less a "dead end"; I couldn't be happier where I am at this point and spending a couple of years working in the area of ads didn't hurt me at all). Keep in mind what your priorities are for your job (they're different for everyone) and do research on what a given role would entail (something that even good CS programs don't really prepare you for: I had to discover my aversion to front-end work the hard way).
Also, be aware that this can change in a few years. Some people consider working for Monsanto a "dead end", because not many other companies would want to hire a person like that afterwards.
By all means, if it's a good company I would highly suggest taking the job. A job at Facebook or Google for a year working as an ad engineer is still going to be a much better experience than most 'enterprise java' positions at a non-tech company.
I get contacted by recruiters every week, so I find any talk about a shortage of jobs in this field to be laughable.