Most people don’t realize that Dickens began his writing career as a legal reporter. He worked as a clerk in a law office, then as a freelance reporter and legal reporter. He certainly knew law intimately, and he did not like what he saw. The law became a focal point of many of his books, and is at least mentioned in almost all of them.
Dickens’s portrayal of Jaggers is most assuredly as a result of his days observing lawyers. He clearly felt they were heartless and the system was inhumane. We also know from his depiction of Magwitch and Compeyson that he felt the system was stacked against the common person, in favor of those the court saw as gentleman.