In general, the level of enemies you face is only determined by the following:
- What playthrough you're in
- Whether you've finished the main story quest or not
- The area you're in
Everything else doesn't affect enemy level. So if you're a level 31 character in a level 17 area, what you want to do is to waltz your way to playthrough 2, jumping through the required hoops.
Good news is, when you're hosting your game and you reach the starting point of a mission you have already completed in another session, you get one (and only one) chance to play through that mission again; if you decline or restart the game, you will be credited for the quest progress you have made in your friend's game.
What you need to do is play enough of the story up to the point where you can skip all the parts of the game you've already completed with your friend. This will bring you to a more level appropriate quest selection.