Well, technically it's ambiguous, but let's do a little research and find out the answer, shall we?
Sergeant Major Daniel Joseph "Dan"
Daly is commonly attributed as having
yelled, "Come on, you sons of bitches!
Do you want to live forever?" to the
men in his company prior to charging
the Germans during the Battle of
Belleau Wood in World War I, although
Daly claimed himself to have said,
"For Christ's sake men—come on! Do you
want to live forever?" (source)
Unless this man had a very specific sense of "humour", I doubt he wanted to make the line ambiguous. When on a battlefield, in a war, I really, really believe there's no time for word play and tricks like this, but unfortunately, unless the man explained his saying somewhere, there is no way to determine what he personally meant.
Going on. Beware that the line dates back before Major Joseph Daly. Frederick II of Prussia, who lived from 1712 to 1786, is famous for having said:
Kerls, wollt ihr ewig leben? (source, along with a great discussion over the quote)
Which translates to:
Dogs, would you live forever? (translation source)
He said the line addressing retreating Prussians at the Battle of Kolin in 1757 of which he was the leader. They lost the battle.
Note that would bears the archaic meaning of a present wish, desire, therefore to rewrite the quote to today's English, it would go:
Dogs, do you want to live forever?
So let's ask ourselves: how many possibilities there for what the king may have meant? Only one!
If they retreat, they would live a few more years, of course, but they would definitely not live forever. If they go back into the fight, they die in the battle, but live forever through their valour.
So to conclude this, technically the sentence is ambiguous, but philosophically and considering the situation in which the line was uttered, it bears only one meaning, the meaning marked as 2 in your question.
After what @snumpy has added, I have re-thought the conclusion and I must say the line still remains perfectly ambiguous. It's true that addressing an army as dogs points to the meaning you marked as #1, but logically and philosophically, it should point to the meaning marked as #2. You have to make your own conclusion and see what you want to see.