Before Infinity War was released, and Captain Marvel's setting details were announced, the "foreshadowing" was as follows.
As I mentioned in another answer, one of the patients alluded to in Doctor Strange, when Stephen is in his car right before the crash could be Captain Marvel - the "22-year old female with an electronic implant in her brain that controls schizophrenia - struck by lightning".
Fans have identified this being somehow similar to Captain Marvel's backstory, and some magazines have asked the director whether it's true, to which they've got the following responses (emphasis mine):
There’s been some speculation that this could be Carol Danvers, aka Brie Larson’s Captain Marvel, which is currently in pre-production. Derrickson is coy about it, but doesn’t deny the rumour, either. “All I can is...maybe. That one, you're going to have to wait and see...”
And for Entertainment Weekly:
Another patient mention in Strange’s call is much more likely to be an important Marvel character in the future. Strange was far more interested in working on her: a woman in her 20s who was struck by lightning – a serious injury complicated by an electronic implant in her brain to help quell her schizophrenia.
When asked if this was a reference to Captain Marvel, who will be played by Oscar-winner Brie Larson in an upcoming film, Derrickson said he could neither confirm nor deny. But he was smiling (so infer from that what you like).
“Remember that Brittany Murphy movie where she goes ‘I’ll never tell…’” he said in a whispered singsong, referencing the 2001 thriller Don’t Say a Word.