Some champions are just really good at harassing. In a 1v2 lane, if you happen to be laning against two casters, then you're in for alot of harassment, some champions are specialy good at it though (ezreal, mundo, cho'gath, vladimir) due to skillshots with very low cooldowns or powerful in some way. But then again, like someone already mentioned, 1v2 lanes shouldn't even exist, both teams should have junglers.
Few people realize that having a jungler isn't all about having a champion that can pop out of nowhere to gank and get lizard and golem buff early, thats only half of it. The other half is having a second solo lane, and therefore another champion with a level and money advantage apart from mid. If you really have to do a solo lane against 2 champions, pray that your jungler is experienced enough to know he's not supposed to just jungle forever (like alot of them do and only come out when they see an easy kill, rather also doing it when one of their allies is having trouble), and that your team is nice enough to eventualy switch lanes with you if you get thrown into a lane with pro harassment champions.
Don't overextend yourself to farm, just stay in close to the tower, provoke them a bit, wait till minions are close and last hit when you can. On a 1v2 lane getting XP is more important then last hitting, because you usualy can't last hit without taking a decent load of harassment to the face, you'll still be able to do it to a decent extent tho, better if you have a champion with some range. Just make sure they don't zone you out of the XP (IE keep you far enough from minions so that you don't get xp), remember you don't need to last hit to get xp, you'll get it as long as you're close enough. Most of the time you can remain close enough to get xp but still far enough to avoid the enemy.