Coarse injectivity, hierarchical hyperbolicity, and semihyperbolicity