Why a single spray does not end an infestation
No. A single spray is rarely enough to end a real cockroach infestation. Roaches breed quickly and hide inside walls and appliances, so effective control usually takes repeat professional treatments plus fixing what draws them in.
A one-time treatment may kill the roaches you can see while leaving eggs and hidden populations behind, so the infestation comes right back. Getting it under control generally means several visits from a licensed exterminator, sealing the gaps roaches travel through, and removing the moisture and food sources feeding them.
If your landlord's only response to a serious infestation is a single spray that does not work, the problem — and the habitability issue behind it — can continue. Keep a record each time treatment is attempted and each time the roaches return. If quick fixes keep failing, a free review can help you understand what a landlord is actually required to do.
This is general information about California tenant rights, not legal advice. Every situation is different.