While many characters and events in The West Wing are based on specific real people and events, not everything is. I think Ashland is an example.
The requirement of a police officer to read rights was established by Miranda v. Arizona in real life, and the majority opinion was written by Chief Justice Earl Warren. While there are some similarities between Warren and Ashland (Warren was certainly the "liberal icon" Toby describes Ashland as), The West Wing roughly takes place during the time period in which it aired, and Ashland is described as having served for 32 years. Miranda was decided in 1966, and Warren died in 1974 at age 83. In the show's continuity, Miranda rights (or whatever they might be called in that universe) apparently were established more recently than they were in real life.
As for Ashland's style of writing, the Cracked article 6 Judges Who Went Completely Insane on the Bench notes several instances of judges writing opinions in verse that occurred before these episodes were written, though none of them were Supreme Court Justices. Ashland's health in general may have been based on then-Chief Justice William Rehnquist, whose health was wavering when the episodes featuring Ashland aired in 2003, and passed away in 2005.
Finally, much of the show is Aaron Sorkin recasting real-life politics in his own (liberal) image. While Sorkin was no longer writing The West Wing at that point, his imprint still remained, and so the idea of a liberal Chief Justice in the modern day was probably a product of that.