tl;dr- A cucumber equilibrates to the environment's condition, such that there's no temperature difference. However, cucumbers can resist temperature changes fairly well, such that if you just pull them out of a cool environment (or drop them into a warmer one, e.g. an oven), then they can be much cooler inside than outside.
Ultimately, the claim appears to have come from a trivia fun-fact in a promotional pamphlet.
Temperature differences at equilibrium are impossible by definition
The scientific definition of temperature comes the Zeroth Law of Thermodynamics:
The zeroth law of thermodynamics states that if two thermodynamic systems are each in thermal equilibrium with a third, then they are in thermal equilibrium with each other. Accordingly, thermal equilibrium between systems is a transitive relation.
The gist is that, if you leave things in contact with each other, they'll eventually reach some thermal equilibrium. Then, by definition, those two objects are at the same temperature.
This means that, if something like a cucumber is left in a stable environment, then it'll reach that environment's temperature. No matter what that cucumber does - even if its molecules start bouncing around wildly, or teleport around the place, or start emitting an eerie, supernatural green light - its temperature is defined as that of its environment.
This means that we can't observe a temperature difference at equilibrium because that claim literally doesn't mean anything.
But temperature gradients are possible outside of equilibrium
The above only applies at equilibrium. Obviously, if you drop a cucumber into an oven, the outside will tend to heat faster than the inside, allowing for a significant temperature gradient to exist
If the oven keeps running, then the entire cucumber will eventually reach the same temperature, but it'll take time to get there.
Source of the claim isn't scholarly
The above question cites "Cucumbers: Natural Food", HowStuffWorks:
All that water also gives cucumbers their unique refreshing quality, especially on a hot summer day. The phrase "cool as a cucumber" is actually a scientific fact: The inside temperature of a cucumber can be up to 20 degrees cooler than the outside air [source: CDC]
While this article's link appears to be broken, the claim appears to be from a USDA healthy eating promotional pamphlet, "Summer Food, Summer Moves: Operator's Activity Guide" [PDF] (p.11):
Fruit and Veggie Trivia
[...] Want to cool down? Try some cucumbers! The inside of a cucumber can
be 20 degrees cooler than the outside air. So cucumbers are a refreshing
way to help make half your plate fruits and veggies.
If you look at the PDF, it's not a technical document; it's full of bright colors and playful photos, apparently meant to help encourage people to eat healthy.