I'm not sure it foreshadows Brutus' death, as such, but it is certainly associated with it: at least, in Brutus' mind. Shortly before Brutus' suicide, he openly admits that it is partly to do with the fact that he has seen Caesar's ghost.
Why, this, Volumnius:
The ghost of Caesar hath appear'd to me
Two several times by night; at Sardis once,
And this last night here in Philippi fields.
I know my hour is come.
Brutus clearly feels somewhere that the murder of Caesar needs to be revenged with his own death, as he suggests in his funeral speech. And, when the ghost does appear, Brutus asks it directly
Art thou some god, some angel, or some devil
That makest my blood cold, and my hair to stare?
Speak to me what thou art.
Is it a figment of Brutus' guilty imagination? Is it a real ghost come to revenge Brutus? Who knows. But it certainly becomes associated in Brutus' own mind with his death.
Hope it helps!