Also, I grew up watching Star Trek, but recently (a few years ago) discovered Doctor Who as well, and now I'm having trouble ranking those two (I feel that in some ways, Who beats Star Trek).
Don't get me wrong, I love Star Trek and Doctor Who, and you are right that Doctor Who is very loose on strict continuity, but I think Doctor Who is more honest with its technology. I admit, Doctor Who often solves the problems in its plots with a solution completely that is made up in the last 5 minutesWho ith no foreshadowing, but they call back to previous episodes very often. Anything that was taken as fact in one episode can be rewritten at any time, and often is, but as often as possible, they use something from the huge array of existing plot devices. I like that. You can tell that the writers like the lore they have created. They leave enough hints that when old plot points reappear, they fit -- like a riddle, they are on obvious in hindsight.
In Star Trek, however, the technobabble explanations are just fill-in-the-blanks. The writers write a script, then later on someone fills in some scientific words. All of the numbers are random. Occasionally, whoever is filling in those numbers or tech words will be able to reference a past event, but most of the time it's just another spacial distortion that does what the writers say.
In short, I think that Doctor Who respects its canon more by using previously established lore when it serves the plot, but a acknowledging and embracing the ridiculousness of the world they've created. Star Trek, on the other hand, rarely cares about previously established lore -- each episode gets a new species or new temporal disturbance. In many ways it's very good and very interesting -- going where no one has gone before -- but it feels like they could explore the already existing things a lot more. Each alien species wears one hat -- they are all plot devices, because when the 6 acts of the episode are over, the Enterprise will warp away never to return. Their purpose is fulfilled. Maybe that's why I'm a fan of DS9 -- it focused less on exploring strange new places, and focused on just a few species and planets.