The simple answer is yes, you can add washers to the axle and shove it in. If you put all the washers on the chain side the disk brake will still work without modification, at the expense of a crappy chain line (assuming you have derailleur gears - with a singlespeed you'll probably have to change the BB or you'll often drop the chain). Or you can space both sides and the disk caliper with washers as well to even things up (spacing the rotor is fraught as the washers all have to be exactly the same thickness and you can't buy them that way. The failure mode here the the rotor deforming under load and possibly locking your wheel up). It will be almost as strong that way as in the right size frame, assuming your washers are flat and the nuts are done up tightly.
The reason you shouldn't do this, especially with a disk brake, is that there is a surprising amount of force applies to the rear wheel of your bike. By adding spacers you're adding longer levers to the little 10mm axle that has to cope with those loads. Since the initial lever is very short, even a small increase can have dramatic effects.
Think about the left hand side. In normal use the wheel bearings are only 10-15mm away from the dropout. Changing that by 5mm makes it 15-20mm. Which is ok if you started at the 10mm end of the scale, but going from 15mm to 20mm with a design rating of 15mm... not so good.
You will probably get away with this because there's so much excess built into most bikes. They have to be designed to cope with 120kg dudes sitting on the seat as they ride off curbs, so your average 80kg bike nut is just not going to stress the bike the same way. So by spacing out the hub you've shrunk that margin of error, rather than immediately breaking something.