Now that you've aquired the Lens of Truth you are not only done with the Bottom of the Well but you are done with the past too, so rather than screw around trying to get out of the well just warp yourself straight to the Temple of Time by playing the Prelude of Light. Before you go back to the future you should complete this quest:
Warp yourself back to the future. Because of the things you did now in the past there are things you get in the future, starting with:
Go back to Kakariko Village to continue the story; make sure you enter from the front entrance.
As Sheik informs you, the Evil Shadow Spirit has escaped. After he's done talking to you he will teach you the Nocturne of Shadow.
Play the Nocture of Shadow to warp yourself to the Shadow Temple, which is actually the back of the graveyard. Funny how the people of Kakariko appear boring when they are actually surrounded by so much evil.
Walk down the stairs behind you and you'll find a whole bunch of chests and a pedastal in the middle of the room. Stand on the pedestal and use Din's Fire to light all the torches. The door in front of you will open, this is the entrance to the Shadow Temple.