In all three cases, Lucene is used as a "low level" (Java) API which provides search capabilities. OS, ES and Solr turn Lucene into a server, with features like horizontal scaling (ES Cluster, Solr Cloud). The major differences are in how well that all works, how easy it is to administer, how much caching and optimization is done on top of Lucene, etc.
I haven't extensively used ES, but I've used Solr a lot (and contributed to), and I can say that it's a mess. The community is not one of the better ones I've seen. Bugs and stability issues are often ignored. Patches sit around gathering dust. There are some gems and very clever people in the community, of course, but it seems like there are too few of them to cope with the large beast that Solr has become. If I were starting a new project in the search space, Solr would not make my shortlist.
ElasticSearch seems to have more mindshare. It can be easier to find resources online to help solve your problems.. though ES moves through versions fast (and they do break backwards compatibility on major version bumps) so sometimes this can still be an issue.
Other benefit is that you don't have to rely on Zookeeper if you're horizontally scaling.
I don't have a ton of experience with Solr but they seem pretty comparable.
The real vendor lock-in for ES (and now AWS OS) is the REST query API; if Solr implemented ES's API, I bet $1 a lot more people would have moved or at least considered moving over
IIRC Solr also has some weird stuff about schemaless indices, whereas ES took the very Mongo-y approach of "yeah, just throw content at the index, don't worry about it" but then separately the approach of "I am angry with your new conflicting field in that document" and throws an exception; so you don't have to worry about the schema right up until you do have to worry about it
Not familiar with Solr but I believe the analogy to linux would be choosing the preferred distro while they all use the same kernel. There are a bunch of long comparison lists if you search for it.