There is a saying among birders... "There's no such thing as a 'long enough' lens". In other words, photographing birds calls for the longest focal length you can get, limited only by your budget and how big & heavy a lens you're willing to haul around.
Both of your cameras are APS-C crop sensor models and that's a GOOD THING! They give you "free" 1.5X or 1.6X teleconverter effect, in a sense. What I mean by "free" is the crop factor makes lenses behave longer than they are, without any loss of light such as you'd have with an actual teleconverter (one stop with a 1.4X or two stops with a 2X, for example).
You are correct, unfortunately. You would have a lot more choice of lenses for the Canon, than for the Pentax. In fact, I use Canon gear and am not familiar with what's available for modern Pentax (I have some vintage Pentax cameras and lenses, but that doesn't help). Following mostly applies to Canon, as far as I know. You'll have to look and see if any of the below are available for use on Pentax.
Even with the "help" of the crop sensors, you will still need the fastest focusing, the largest aperture and the longest focal length you can get to photograph birds. And $700 budget is not a lot to work with.
Forget about 70-200s.... they just aren't long enough, even with a 1.4X teleconverter... which will reduce image quality, possibly unacceptably... depends upon the specific lens/teleconverter combo. And only the latest, most expensive 70-200/2.8s and 2X TCs give usable image quality... for those you'd need about 4X the budget you've got, and still would only have a combo that makes for a 140-400mm f/5.6.
There are some pretty good and fairly affordable 70-300s, too... but they aren't much longer than the telephoto you have now and really aren't up to bird photography, either. Most cannot be used with teleconverters, either.
One of the "budget" lenses that a lot of birders use is the Canon EF 400mm f/5.6. It's quite sharp and fast focusing... but unfortunately it doesn't have image stabilization so you have to keep your shutter speed up and/or use it on a tripod or at least a monopod. And, new it's selling for $1150 right now (holiday sale price). It's been in production for some time and a lot have been sold, so you can find them well under $1000 used (B&H has one used for around $850). Another drawback is that you only have the one focal length with this lens. On some of the newer Canon cameras it can be used with a quality 1.4X teleconverter as a 560mm f/8 combo, but your older 40D would not be able to autofocus it... it's an "f/5.6 limited" camera (current 80D, 77D, T7i and 7D Mark II are all "f/8 capable", would be able to focus the lens/TC combo).
Another option and one I've used a lot is the Canon EF 300mm f/4L IS USM lens with and without a 1.4X teleconverter. I use the Canon 1.4X II with mine and the image quality is very good. This combo will be able to autofocus on your 40D, has image stabilization and gives you two useful focal lengths.... 300mm without the TC and 420mm with it. One minor drawback to the lens is that even though it's still in production, it's one of Canon's earliest image stabilized lenses and, as such, the IS is a type that needs to be turned off if using the lens locked down on a tripod. When there is no movement for the IS to counteract, it can actually go into sort of a feedback loop where it's creating movement and will cause problems in images. Personally I have no problem with it because I mostly use it handheld or on a monopod... it's moderate enough size I can shoot with it all day. But even when I put it on a tripod, I use it with a "loose gimbal" head, and there's never any problem with the IS.
These were shot with 300mm f/4 alone (left) and with that lens combined with 1.4X II (right):
Both the above were done with the lens on original 18MP Canon 7D camera. Of course, most of the lenses mentioned here are full frame capable. Below image were shot with 300mm f/4 on 5D Mark II. The left hand image with the lens alone, the right hand image using 300mm + 1.4X II:
Canon's 100-400mm "II" is a great lens... very sharp with fast AF and highly effective newer form of IS... that would give you the versatility of a zoom, but sells new for approx. 3X your budget. I've seen few selling used, and even those have been more than 2X what you hope to spend. It's also a bit bigger and heavier than the 300mm f/4 lens, tends to be more tiring to use handheld for long sessions. I use this lens a lot now. It's also an f/5.6 lens at it's longest focal length, so would not be usable with a teleconverter on your 40D, but would be able to autofocus with 1.4X on the newer Canon models... and is said to work pretty well with a 1.4X III. I use this lens a lot now and it's excellent, but haven't yet experimented with combining it with my 1/4X II. Following image was done with the 100-400 II on 20MP Canon 7D Mark II:
Canon also made an earlier version of the 100-400mm, somewhat unique among zooms today because it's a push/pull zoom/focus design. Folks who use that either love it or hate it. It's very fast to operate, making it popular for birds in flight and airshow photography, among other things. The 100-400 II does away with the push/pull design... uses two separate rings for focus and zoom... but isn't all that different to use because of autofocus. Most of the time I'm only using the zoom ring (rotated, of course, instead of push/pulled). I never had the original, push/pull version of the lens, but several friends used it and it's very capable too. It can still be found new for around $1200, or used for roughly $800 to $900. One thing I'd note... the push/pull version doesn't "play well" with filters. For some reason, even high quality filters tend to make it "go soft". A lot of long time users were stunned to learn how sharp their lens was, once they removed the "protection" filter they'd had on it from new! AFAIK, the II version works fine with filters. But I don't recall ever using one on mine, in the two years I've been shooting with it. I don't know how well the push/pull version works with 1.4X, but it wouldn't be able to autofocus on your 40D anyway.
Those two Canon 100-400s use a fluorite element, which helps minimize chromatic aberration in telephotos. None of the other lenses listed here use that. Canon uses fluorite a lot in their teles.... have done so since the 1970s, pioneered methods of growing their own, pure fluorite crystals for the purpose and some procedures working with and implementing the fragile elements. All but one of the Canon 70-200s and most of their "super telephotos" from the 200mm f/2 on up use fluorite. Nikon has recently revamped their super teles and one of their 70-200s to use it too (indicated by "FL" in the lens name), but are charging substantially more for it. AFAIK, no one else is currently making lenses with fluorite. Over the years most lens manufacturers have experimented with it at one time or another.... but it's been expensive and difficult to work with. So they try to use other types of lens elements instead. (Side note: Supposedly one of the reasons NASA didn't select Canon gear for use was due to concerns that fluorite in some Canon lenses wouldn't hold up to the rigors and g-forces of launches!)
The other Canon lens I use for birding is their 500mm f/4L IS USM... with and without 1.4X II and 2X II teleconverters. This Western grebe image was done with that lens wide open and with 1.4X II (effective 700mm f/5.6) on Canon 30D camera:
The 500mm is superb both on it's own and with teleconverters, but obviously out of consideration due to it's high cost. It's also quite large and heavy (roughly 8 lb.), pretty much a "tripod only" lens.... So add another $1000+ or so for a solid tripod with a gimbal head to shoot birds and wildlife (above was done with a Gitzo 1325 tripod, Kirk BH-1 ballhead and Wimberley Sidekick gimbal). I opted for the 500mm f/4 instead of the 600mm f/4 to save size and weight! But there are times I wish I had the Canon 800mm f/5.6!
On a more practical note, Sigma and Tamron are both now making 100-400s, too. And they are much more affordable than the Canon, at approx. $800 new (but are too new for many to show up used yet). Plus they are a bit smaller and lighter than the Canon. However, both are f/6.3 at 400mm (1/3 stop slower than the Canon) AND both step down to smaller apertures at much shorter focal lengths than the Canon. In fact, though much of their range the two third party lenses are 2/3 stop to a full stop slower than the Canon lenses. The Canon 100-400 II starts out at f/4.5 thru 134mm, then is f/5 from 135 thru 311mm, and is f/5.6 the rest of the range to 400mm. The Tamron starts at f/4.5 and maintains that to around 135mm, too.... then is f/5 only up to 180mm, f/5.6 from there to 280mm and f/6.3 beyond that. The Sigma is even slower... starting out at f/5 and stopping down to f/5.6 at only 112mm, then stopping down again to f/6.3 at 234mm! The third party lenses will struggle more in challenging lighting conditions. Another thing... both the Canon include a tripod mounting ring, which is something I personally think is essential on a lens that reaches 400mm.... especially when it's used on an APS-C camera (which magnify the effects of camera shake). A tripod ring is optionally available for the Tamron lens... for about $129 added cost. The Sigma lens doesn't even have that as an option.
And, yes, there is the Tamron 18-400mm now, too. Sounds convenient, but don't expect as good image quality with such an extreme zoom, compared to any of the above, less wide ranging zooms. Also the 18-400's autofocus will be slower. And it stops down significantly at much shorter focal lengths than any of the above. It starts out at f/3.5 at 18mm but has stepped down to f/5.6 by only 90mm and again to f/6.3 at around 120mm and beyond. So it's a full stop or more slower than the Canon 100-400 II at many of the important, longer focal lengths. I would want to test this lens thoroughly before committing, to be sure it's image quality is acceptable and it's overall performance is sufficient. At about $600 it is within your limited budget, but AFAIK it is only available in Canon and Nikon mount. Finally, of all the lenses listed here, the Sigma 18-400mm is the only one that's "crop only"... fine for use on your APS-C camera, but not usable on full frame.
Of course, there are the Sigma and Tamron 150-600mm lenses.... there have been four, in fact. Sigma makes two presently (a cheaper "contemporary" version and a more expensive "sports" model). Tamron replaced their original with an improved "G2" version a year or two ago. These lenses are considerably bigger and heavier, as well as more expensive than your budget allows. But you might find a used one that's more affordable.
Sigma has also recently introduced a 60-600mm... don't know a lot about it, but it probably takes the place of a 50-500mm they made some years ago and I would imagine it's pretty big and heavy. A friend used the old 50-500mm (he is also a Pentax shooter, but since the 50-500mm wasn't made in that mount, he bought a Canon body just for use with that lens... contacted me initially to help learn how to use the unfamiliar Canon).
In the past Sigma also made 120-400mm and 150-500mm zooms, which you might find used. I seem to recall there were later versions of those with "OS" image stabilization, as well as earlier ones without it. As best I can tell, none of those older models that have now been discontinued for some time have as good image quality as the above lenses currently being offered. I do see them selling for around $500 or less sometimes. But, again, I'd be concerned that the image quality might not be sufficient... and don't know if any were offered for use on Pentax. In fact, there may be other options for Pentax I'm unaware of.... you're on your own there.
Hope this helps! Have fun shopping.
P.S. I just noticed some of the earlier comments regarding Image Stabilization.... I've been using IS lenses for going on 20 years now. In fact, IS was one of the key reasons I switched to the Canon system years ago. I almost never turn IS off..... ESPECIALLY on telephotos like we're discussing here. Even when I'm using fast enough shutter speeds, it also stabilizes the image in the viewfinder to some extent, which helps when shooting moving subjects and trying to keep them framed with long tele lenses. And I know for certain I've gotten any number of images that would have been pretty much impossible without it. I'm not sure, but bet I've taken close to a quarter million photos with IS... and have almost never seen any negative effects due to it. IMO, it's one of the best things to happen to photography in the past 30 years. Wouldn't want to be without it now. All my telephotos have it and some even have the switches taped over to prevent accidentally turning it off! I am only experienced with the Canon IS system, though... other systems may be different (I know Nikon shooters think VR slows down autofocus, for example... I think the opposite is true with Canon IS).
There is a saying among birders... "There's n... (