I dont think you're going to get caught for switching texts. People decide to answer different questions all the time in their legal exams, instead of what they studied, it happens in ancient too and im sure other subjects. I dont know about this whole having to study a novel thing...teachers pick which text to do for the module and the reason you did this Cloudstreet rather than King Lear was probably because you were already doing Shakespeare for module a, and your teacger thought doing two shakespeare texts would be arduous. I really dont see anything terrible happening, except you perhaps not doing as well because you chose to do a text that you didnt study, and therefore it is thought that you would only be able to provide a shallow analytical response as you did not have the feedback and help from the teacher. But of course, there are always exceptions and you may know king lear inside out and present a very in-depth, sophisticated analysis.
I say do what you think will get you the better result. The HSC is one big gamble...go for it!