RAW the answer is no
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 rule the act of "squeeze" 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 area the game assume you occupy always all the square you are into.
Finally, if the square is trapped, even if you squeeze the trap set off. In a square with a trap, by rules, the square have not a safe zone to pass throug (ofcourse this is a general state...the GM can allow to squeeze 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 an 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, give you the chance (but is not automatic) to make stealth checks if you want.