Assuming the quasit wins initiative, only if the quasit wants to kill the characters. Unfortunately their splash weapons will be fairly useless...
It has access to 2nd-level cleric spells at best, and only a few of these prepared, not necessarily optimal - I don't know what the encounter tells you. Perhaps to work with his invisibility he has prepared Spiritual Weapon. This will last 3 rounds each casting and have no guarantee to hit. Survivable, if definitely a threat to the party, while they have a few rounds to think creatively. The quasit may decide to use its cause fear ability - a threat, but also a way to pinpoint it, and throw flour, glitter, daggers, or arrows at its square.
If the meatshield is defeated, always a possibility with meatshields, it will run out of ways to remain invisible and still distress the party. At this point, presumably, it decides to test out that returning dagger, with the gamble that the party's weapons will not pierce its damage reduction too greatly. At this point it goes invisible after each strike against it until it has recovered its hp; and at the least our heroes have a ton of time to plan. It may even get within 10' to try and hit more accurately.
If our heroes have cold iron arrows and multiple bows, or some way to make their ranged weapons good-aligned (bless weapon unfortunately is hard to access), they should be set. If they do not, but can each manage 9-10 physical damage or 4-5 non-elemental damage of force or some such with a ranged attack - or manage to pull off a successful color spray - they could manage.
But a CR 5 or so enemy is going to give a party trouble at the best of times.