Will java code compiled using OpenJDK always run on Oracle's Hotspot or vice versa?
If they are the same version, yes.
But if you compile on Java 7 and try to run on Java 6 or earlier, you will get problems (unless you use the -target switch appropriately).
There are also differences in both the Java language and Java compilers' interpretation of the JLS between different versions of Java. But these differences typically lead to compilation errors, not to different code.
In reality, OpenJDK and Oracle JDK are pretty close. In fact, for matching versions I'd expect the bytecodes produced by the respective javac
compilers to be virtually identical. Compiler bug fixes made to one codebase are ported to the other as a matter of course, and code generation bugs in the bytecode compiler are pretty unusual. Other differences in generated bytecodes (i.e. not due to bugs) are unlikely to impact on the behaviour of a properly written program.
Is it safe to say: "Java is "Write Once and Run Anywhere, provided the javac compiler and JVM are from the same vendor? "
Erm ... no. There are differences in Java behaviour for different platforms; i.e. Java on Windows and Java on Linux behave differently in some respects. Some of these differences are directly attributable to the platforms themselves; e.g. pathname syntaxes and file locking are different on Windows and Linux. Others are due to issues with mapping from Java to the platforms' different native windowing system.
These differences are nothing to do with compilers or code generation.