It sounds to me like your group is trying to apply a model and understanding of coauthorship that is suitable for academic papers (in some fields) but is really unsuitable when it comes to books.
As an aside, I wonder whether you really mean a textbook, which has the connotation of a book used for instruction rather than the dissemination of cutting edge research. It sounds to me like what you have written is rather a research monograph. If you were actually writing a textbook, then a significant amount of editing and proofreading would be done by the editorial staff of the publishing company. So I suggest that you clarify the situation in your question. (At the extreme, there are certain books which are essentially book-length articles and such that treating as an academic paper would be more appropriate.) Here is one key question:
Does the book contain new academic results, so that by including someone or not as an author the results will be attributed to them or not?
If the answer to that is yes, then this could be a major issue, such that not publishing the work as a book may turn out to be easiest and best.
As others have already pointed out, one has to say that it is not a good practice for a book to be written and worked on by several parties without discussing the authorship issue. In this case, you say that the book was submitted to the publishing company and accepted for publication without this issue having been sorted out. I wonder how that is even possible: certainly when you submit a text it includes a list of authors, and the editors will take the information very seriously. What is the list of authors on the version that was accepted by the university press? How did Professor Z convey the authorship situation to the press? (If he really didn't say anything at all, then it is not clear that you should proceed with the publication. If Z comes back and says to his editor "Actually the authorship issue is very complicated," then the editor may well agree.)
Anyway: here are some options:
Have Z be the sole author of the book.
If Z did over 90% of the work and even more of the intellectual work, then in my view this is the option to work towards if possible. The amount of work it takes to publish something is so great that even 10% of it is a lot, so Z should be looking to compensate his coworkers in some way. Of course they should be warmly acknowledged at the front of the book. I think Z should also consider some sort of payment.
It took me a little while to remember this, but the summer after I finished my PhD, my postdoctoral advisor asked me to proofread his book, a research monograph. Or rather, he offered me a certain amount of money to do it (I can't quite remember the amount, as this was 2003; maybe $1000). I accepted, and this was a nice experience for me. I really can't remember how long I spent on it; 20 hours would be a very rough guess. Of course I did not appear as a coauthor!
But one of the main differences between books and articles is that for books, people who are involved are usually directly paid. The A and B who did mostly editing and proofreading seem like good candidates for being paid, and perhaps paid by the publishing company. By the way, for a major university press, the company itself is almost certainly going to do editing and proofreading of its own, which makes it a little stranger that Z got his colleagues to do it.
Have Z be listed first as author, followed by A,B,U,V,W.
Since Z's name comes last alphabetically, having him appear as the first author should signify an extremely unbalanced authorial contribution. Since he is characterized as doing more than 90% of the work, this seems appropriate. The question is whether everyone else did enough to be included at all: did they actually write some of the book or not?
Have Z be the sole author, and add a line "with A,B,U,V,W"
This is a bit unusual, but not really irregular. If there is no other way to compensate A,B,U,V,W for their secondary work then maybe this is the best solution.