I think this is a bash interpreter issue, in that it basically removes the quotes. Try this:
qsub -v Nlay=10,prefix=\"qwerty\" dump.sh
The backslashes prevent the quotation marks from being interpreted as instructions for the bash interpreter.
Note: it may not completely solve the problem, due to bash itself being used in dump.sh. You may also need to pass the backslashes themselves... which makes it look a bit bulky, like this:
qsub -v Nlay=10,prefix=\\\"qwerty\\\" dump.sh
Which would then appear in dump.sh as \"qwerty\", which would then be interpreted by bash and be passed to octave as "qwerty". Not sure if there's a more sleek solution.
There's a more sleek solution, although only slightly so. It's like this:
qsub -v Nlay=10,prefix='\"qwerty\"' dump.sh
Single quote will make it pass the backslashes, but unfortunately you can't use two single quotes - it won't pass ''qwerty'' correctly.