The general rule for targeting states:
A Clear Path to the Target
To target something, you must have a clear path to it, so it can't be behind total cover.
The problem is that, while you (the warlock) can see the target via the raven, Hex is originating from the caster, not the raven. Because there is not a clear path between the warlock and the target, Hex (or any similar spell) can't be targeted at the hostile creature beyond the wall.
A spell like Sacred Flame, however, would allow you to make a "bank shot" like this because it includes the sentence:
Sacred Flame
The target must succeed on a Dexterity saving throw [...] The target gains no benefit from cover for this saving throw.
Additionally, an AoE spell like Fireball would work. You would be aware of the target's existence and location by using the raven's sight and then cast the AoE spell so that its effect wrapped around a corner to hit the target.