If you are concerned about your iPad (or iPhone) being potentially compromised via a USB charging source (a.k.a. “JuiceJacking”), you are very sensible to investigate the potential sources of compromise. This isn’t a new risk or exploit, but has become more widely known due to recent media interest and exposure…
There are many documented instances of public charging sources - such as those frequently found in shopping malls, transit hubs, airports and public transport - being used to either attempt installation of malware, or to extract personal data and information from the connected device.
While it is possible to modify a standalone Power Adapter to perform various technical attacks and exploits, due to physical space constraints in accommodating modifications involving electronics, modern stand-alone Power Adapters are very difficult to successfully modify. For this reason alone, using your own Power Adapter in preference to public USB power sources is recommended best practice.
The current advice is to avoid connecting your devices to anything that cannot be sure is trustworthy - be it a public USB charging source, or a charging cable that you have not obtained from a good retailer.
The Apple Power Adapter and charging cable that was supplied with your Apple iPad can be reasonably assumed to be safe - as can replacement items that you purchase directly from Apple or an Apple Authorised Retailer.
If you are concerned, you should always charge you iPad from your own Power Adapter or portable PowerBank battery. Always use your own cables of known provenance. Connecting your own USB Power Adapter to a public AC-mains power source is safe.