KiCAD has heaps of footprints of common and not so common packages built in, and most parts come in standard packages. You have to select the correct package (the LD1117V33 is available in at least TO-220, DPAK, SOT-223 and SO-8 packages). The three holes and silkscreen suggest you've picked a TO-220 package and intend to bend it flat on the PCB.
It is in general OK to have traces run behind parts. Resistors and capacitors make for great jumpers. Of course it depends on the part, not all parts will be happy with traces behind them, and I also wouldn't do it behind parts that can get particularly hot, even more so when they use the PCB as heat sink.
If my assessment is correct for the TO-220, I'd avoid routing behind it. The back of that part is exposed metal, minor damage to the soldermask may cause problems. In your case however you picked the trace of pin 2 to go behind it, that's connected to the tab so such accidental contact would not cause a problem in this particular situation. Heat from the part may still be an issue.