We introduce a notion of quasi-lisse vertex algebras, which generalizes admissible affine vertex algebras. We show that the normalized character of an ordinary module over a quasi-lisse vertex operator algebra has a modular invariance property, in the sense that it satisfies a modular linear differential equation. As an application we obtain the explicit character formulas of simple affine vertex algebras associated with the Deligne exceptional series at level −h ∨ /6 − 1, which express the homogeneous Schur indices of 4d SCFTs studied by Beem, Lemos, Liendo, Peelaers, Rastelli and van Rees, as quasi-modular forms.