The "futile" sense dates from the 14th century, but the "proud" sense does not appear in English until the end of the 17th, and this is the meaning which we must be careful not to read in when we encounter the word in Shakespeare.
"Speak to that vain man", King Henry tells the Lord Chief Justice, referring to Falstaff (Henry V, V.v.46); he does not mean that Falstaff is conceited, only that he is foolish or stupid.
And this is the sense required when Sylvia says "my father would enforce me marry vain Thurio" (The Two Gentlemen of Verona, IV.iii.17) or when Goneril shouts at Albany, "O vain fool!" (King Lear, IV.ii.61).
The "proud" sense beckons temptingly at times, but the temptation should be resisted.
Even when Antipholus of Syracuse says "there's no man is so vain That would refuse so fair an offered chain" (The Comedy of Errors, III.ii.188), it is still only the sense of "foolish" which would have been understood at the time.