Standback's answer is excellent on the general principle, but I thought it was worth paying some more specific attention to the issue you raise, and perhaps even looking at some examples.
What do we do if works in a shared universe contradict each other?
If a question is asked to which such contradictions are relevant, then discuss them in the answer. A good, complete analysis of a complex issue with many possible answers would discuss all available evidence, including if some parts of this evidence contradict others.
What do we do if a question can be answered only by reference to another work in the shared universe (i.e. is this a valid answer to the question)?
It's a valid answer unless there's some reason to consider it invalid. Again, if there are complications which make its (in)validity unclear, then discuss that in the answer.
Does the situation change at all if the works have different writers?
Does the situation change if it isn't supposed to be significant that the works share a universe (as opposed to stories in which the shared universe is of direct importance)?
Yes, these things could add extra complication to the situation, and again they should be taken account of in the full analysis.
If all evidence points to one conclusion, and an answer is given, then an author releases another work which contradicts it, is the answer rendered invalid?
No: not invalid, only outdated. If an answer provided an analysis which was complete at the time of writing, and then new evidence comes to light when the author releases a new book, then that answer is still a valid summary of the situation before that new book. It should then be edited to incorporate the new information - or, if for some reason this isn't done (e.g. if the answerer is no longer active on the site), somebody else could write up a new and more up-to-date answer. On this particular aspect of the issue, we could probably learn from the way SFF has dealt with similar problems: see e.g. this meta post about obsolete answers and this earlier one about wrong (e.g. obsolete) answers.
Examples
Let's say somebody asks whether, in the harry-potter series, Harry Potter is a Horcrux. The answer to this one is complicated, because Dumbledore (the wise mentor) says in the last book that he is a Horcrux, but J.K. Rowling (the author) has said in an interview that he is not. On SFF, this question would be answered by considering which of these two sources is a higher level of 'canon'. Here on Literature, a good answer would take both claims into account along with any other pertinent information, discuss the contradictions between them, and (perhaps) give reasons why one of them should be considered more reliable than the other.
Another example: it's well known that two of the Sherlock Holmes stories contradict each other on the issue of where Watson's war wound is located on his body. If somebody asked a question about this (OK, it would be a bit of a trivial question), a good answer would be "the canon contradicts itself", supported by the two opposing quotes from the stories. I doubt there's any good reason to consider one more reliable than the other, but if there is, then a really good answer would also explain that.
You get the picture. If there are contradictions, an answer shouldn't be partisan towards only one possible interpretation, but should address and discuss those contradictions.
Let's say we have contradictory evidence, drawn from a combination of the following:
[long list]
How do we know how to prioritise these and come up with a satisfactory answer?
Don't prioritise them; cover them all! Of course, if there is a reason to prioritise one over the other, then say so. But such reasons will be different from case to case, series to series, author to author. The important thing is: don't just ignore any relevant piece of information, no matter the source.