First, being precise, the compound - as a compound - once patented or published is no longer new and can't be patented "in a new context" in the U.S., however it can be patented in Europe for new therapeutic use.. A new method involving its use could be patented, in the U.S. However, note that in many places (EPO) methods of treatment are not patentable at all and so-called swiss type claims are no longer allowed in most places.
The criteria is non-obviousness. That means that a hypothetical person of ordinary skill in the art who knew everything ever published that is relevant to the problem would find the new claim obvious having done merely ordinary experimentation. The way the examiner makes a case for obviousness is to find all of the elements of the claim in published references and argue that combining them to reach the proposed claim would be obvious to that hypothetical person.
There was a time when to argue obviousness the examiner was required to show there must be a suggestion or teaching in the prior art to combine elements shown in the prior art in order to find a patent obvious. That is due to hind-sight bias that makes most things seem obvious after you know.
With that no longer a requirement ( KSR v Teleflex ) it is easier to find something obvious. Now arguments as to obviousness might take these forms -
Combining prior art elements according to known methods to yield predictable results;
Simple substitution of one known element for another to obtain predictable results;
Use of known technique to improve similar devices (methods, or products) in the same way;
Applying a known technique to a known device (method, or product) ready for improvement to yield predictable results;
"Obvious to try" – choosing from a finite number of identified, predictable solutions, with a reasonable expectation of success;
Known work in one field of endeavor may prompt variations of it for use in either the same field or a different one based on design incentives or other market forces if the variations are predictable to one of ordinary skill in the art;
Some teaching, suggestion, or motivation in the prior art that would have led one of ordinary skill to modify the prior art reference or to combine prior art reference teachings to arrive at the claimed invention.
Arguments against obviousness include that the problem was long viewed as important to be solved but had not been solved, that the results were surprising, that there was near universal teaching that it would not work, and that constituent elements had to be modified as to subvert their original purpose before being combined.