RAW, the answer is no
The Squeezing rule states:
In some cases, you may have to squeeze into or through an area that isn’t as wide as the space you take up. You can squeeze through or into a space that is at least half as wide as your normal space. Each move into or through a narrow space counts as if it were 2 squares, and while squeezed in a narrow space, you take a –4 penalty on attack rolls and a –4 penalty to AC.
As you can see from the rules, the act of "squeezing" is always related to an area not wide enough to contain the creature/character. If the creature/character is inside an unoccupied square and free arean the game assume you occupy always all the squares you are in.
Finally, if the square is trapped, even if you squeeze, the trap is set off. In a square with a trap, by rules, the square does not have a safe zone to pass through (of course, this is a general state... the GM can allow to squeezing to pass a trap).
What can you do in your situation?
Using the rule, simply, your creature can use stealth to hide itself and prepare an ambush (a counter ambush in this case?).
Create a houserule and allow to squeeze even in standard squares.
Keep in mind anyway... that what are you saying here:
[...] For example, a huge or larger creature backed up against a cliff who expects to be targeted by arrows, can they 'press themselves to the wall [...]
What you want to achieve is more cover than squeeze in my opinion and cover provide a +4 AC... and I think, in this case, is fine since the creature is acting to be protected from arrow fired at him from up the cliff so I suggest you think about "cover" more than "squeeze".
Other than this, cover gives you the chance (but is not automatic) to make Stealth checks if you want.