If the desk is particle board (that grainy stuff that is made from sawdust and glue), then I'd avoid trying to screw anything directly into it.
Instead, I would get a piece of 3/8" plywood, and glue it to the bottom of the desk using some construction adhesive (sold in various forms at all the big box stores; PL9000 or No More Nails are some products that would work). You could do some small-ish strips near the areas where the tray will actually attach, but keep in mind that the bigger surface area means more adhesion and spreading of the load. Not seeing what you have, my gut would be something like an 8"x5" piece on each edge of the tray would work. If you don't care you could just do the whole bottom of the desk (on the upside this will also make the desk a bit stronger). Keep it back an inch or two from the edge so you can't really see it.
Screw the plywood to the desk using some 3/4" #8 or #10 wood screws, and if you have them, use some clamps to hold it. You might need to pre-drill (especially for #10) depending on the density of the desk -- if it's too dense, the screw could cause it to crack apart around where you put it in (clamp it first, before predrilling, to make sure everything stays lined up). Be sure the screws are not too long to go through the top, and be careful not to overtighten and strip them out. The screws are just going to hold temporarily while the glue dries, though there's not really any point in taking them out afterwards.
Once dried, you can then use some 3/4" screws (probably even the ones that came with it) to attach the tray. The screws will mostly be holding onto the plywood.
If the desk is a fairly dense solid wood, you might be able to get away screwing directly into it. Use a shorter, thicker screw (bigger threads = more hold) like a 1/2" #10. It'll probably be necessary to also use a washer to prevent it from going too deep, and you'll definitely want to pre-drill a small hole for each screw.
Alternatively, you can add the plywood as described above, though you might be able to get away with 1/4" thickness.
I honestly have to recommend that you buy the work bench top pre-built. You can buy these for about the same cost of the raw material itself. The ready built ones are beautiful, nicely sanded and sealed with rounded edges. Look for work bench tops at certain online business supply places. Tops can be found that are about 1.75 inches thick which are very sturdy. A typical top is 60x30 inches in size.
As I recall the IKEA ones are way thinner. Maybe 1.00 or at most 1.25 inches thick.
A web search will turn up many sources. One name to keep an eye out for would be ULINE.
Best Answer
Yes to pilot holes. #10 or #12 pan head screws, 1-1/2" long.
Subtleties in leg positioning aren't going to matter. If, as @FreeMan suggests, the desk has wobble problems, you could put two struts on the back legs that form triangles. Or you could tie it to a wall with a bracket if you had a wall handy.
For anyone facing the same questions about sag, the Sagulator, http://www.woodbin.com/calcs/sagulator/ is a great resource to see if a given piece of wood or wood product will sag under a particular design load. If the OP had a flimsier piece of wood, that might have guided the positioning of the legs or changed the design.