Yes. An event can foreshadow later events; a few cases of infectious disease can foreshadow an epidemic; in this nuance of the meaning the event itself does the foreshadowing. Events contained in a work of fiction can foreshadow future events in the same work of fiction, or future events in the real world. Also, warnings or predictions in speeches or written publications can foreshadow future events.
Merriam-Webster gives examples of the first two:
Her early interest in airplanes
foreshadowed her later career as a pilot.
The hero's predicament is
foreshadowed in the first chapter.
Foreshadow (Merriam-Webster)
Fictional events can foreshadow real ones. It is often said of H.G. Wells that his science fiction novels of the late 19th and early 20th centuries, especially The War of the Worlds, foreshadowed the horrors of warfare made possible by improved technology:
H.G. Wells’s vision of the earth under alien attack foreshadowed the
horrors of the 20th century.
2006 Daily Telegraph book review