Analysing papers and providing search Suppose I want to provide "smart" (AI, meaning extraction etc.) search over many published papers (specifically, biological) to simplify researchers' live.

Now, I have access to my university library that contains text of many papers from different sources, including those with payed subscription.

Is it legal to download all papers, analyse them and provide search without disclosing full text of the paper, only small part of text or image and with proper citation?
I do not see any problems with it as long as you disclose your methodical approach and as long as your university library's terms allow such a behaviour (which is doubted by Bryan Krause in the comments). Perhaps it is best to ask your university library just to make sure.
If the concerns hold, you could alternatively use open datasets of full-text scholarly publications. Just to name three examples:

The Semantic Scholar Open Research Corpus (S2ORC), comprising 12.7M+ full text papers from various disciplines.

The Elsevier OA CC-BY Corpus, another cross-disciplinary dataset that entails 40k full-text papers.

CORD-19: The Covid-19 Open Research Dataset.