You are comparing apples to oranges.
The songwriting of Lennon/McCartney and the songwriting of Edge/Bono are not easy to compare, imo. I think they are both genius in their own ways, but they are based in different styles.
Lennon and McCartney wrote melody-based music. Even in the post-Revolver days when the music got a little more 'rock', it was based in and on melodies. And Lennon and McCartney were really fucking brilliant at writing pop/rock melodies, and the harmonies to go with them. Eleanor Rigby, Yesterday, I Want To Hold Your Hand, Hey Jude, Hello Goodbye, Lady Madonna, Norwegian Wood, In My Life, Hard Day's Night, Help, all based in melody.
Edge and Bono write music that is based in the concept of creating soundscapes, atmospheres, little worlds, with the music. Or at least that's what they wrote until ATYCLB, and still do on a song here and a song there. Streets, Bad, Until The End, NYD, WOWY, The Fly, Lemon, Mofo, Please, etc etc, do not have, imo, a melody as the driving force. They are about soundscapes and atmospheres, using instruments to create an aural world, if you will.
Both are genius in their own ways, like I said before. However, it is easier, imo, for a great melody to become timeless and known by generations over than it is for a soundscape or musical atmosphere to do the same. That, imo, is why the Beatles music is more timeless in that respect.
It would be easier to compare the Beatles to Simon&Garfunkel and the like, while comparing U2 to The Cure and Depeche Mode and to an extent, Radiohead.