Just cruising around the websites of local stores in my town, their websites that were made 5-10 years ago still look the same as ever, and for the most part still function the same as ever. (The exceptions being when they relied on third-party includes that have since gone out of business.)
HTML5 is just HTML, and unless that fundamentally changes, it should work "forever." JavaScript too, again, unless you're linking to frameworks hosted by companies that later go out of business. JavaScript usually adds, but rarely takes away.
The look of your HTML site 10 years from now may look more outdated than your Flash site does, but as long as we're all still around, I'd wager that they'd both still work, provided Flash player is still a thing.