The 400D's competitor from Pentax would be either the K100D or K110D, was it a typo?
As already side, with either you will be locked into their systems for lenses and accessories, and this gives a huge benefit to Canon, as well as Nikon, who not only have a large range of their own, have much better support from third-party manufacturers.
But if you know what you want to do and that you can get what you need for a Pentax then it is not so important that there is loads of stuff available that you will never buy.
Image stabilization is better in the lens than the body, but it costs more so maybe the shake reduction technology in the K100D is important to you if you are on a budget, while Canon's lens based system will be better if you are not.
No camera is so bad that you will be disappointed with it, so unless there is something that one does which you really want the best thing is just to go to a shop and try them out and see which you prefer.
It is impossible for most of us to say what is right for you though. For one thing it depends on what you need to use the camera for and what your budget is. But I doubt many of us have practical experience of both cameras to be able to objectively compare.
Michael.