Updated - again, do not take these names or contracts as gospel; they are fundamentally placeholder estimates, save for the long-term deals.
2023-24 is the first year the Sharks' financial situation starts to be a problem now, but they can probably move Labanc and Simek for some flexibility.
The real issue in 23-24 is whether everyone stays healthy and effective. Is Couture still capable of playing 2C? Is Burns still capable of playing 25 minutes a night? Do the Sharks have a legitimate starting goaltender? Are the depth players (Barabanov, Balcers, Dahlen, Merkley, Middleton) contributors worth their cap hit? Do the prospects develop into something useful? I'm skeptical all of these questions can be answered in the affirmative (as it is, Burns is pretty much a tire fire now, and I still have him playing tough minutes despite being two years older).
Financially, though, I think the Sharks will be fine, though they have dug themselves a hole that will be challenging (not impossible) to fill back up. The Hertl deal doesn't actually block anything save a teardown where the Sharks pick up assets in exchange for their cap space, as well as losing out on up to two prospects who might be more valuable combined than Hertl will be (but as the odds of acquiring a legitimate 1C are very low with those assets, probably wouldn't be true during the squeeze years and would likely be irrelevant after them).
Buying out Vlasic, though, is pretty much essential. They need the roster space, and they're going to need the cap room.