Black pepper is an aromatic spice, so the taste properties are based on volatile compounds that are released from the pepper and into your airways (you actually taste through your nose, not your tongue).
That being said, the most relevant factors for you to know if the taste will last or not are:
- The exposure to oxygen (that's why freshly ground pepper is much more intense than pre-ground pepper)
- The exposure to heat (that's why if you make a stew, it is advised to pepper it close to removal from heat so it doesn't lose the flavor)
After ruling out these factors (you're using the same pepper, and cooking time is the same or we're talking about a raw dish), you have better solubility of the pepper compounds in an oil-water mixture than in pure water or pure oil, and better in pure oil than in pure water.
Mixture > Oil > Water