If you have epub files with sizes of 10 to 40 Mb, they must be chock full of fonts and, more probably, images. Images
usually take up more space than fonts in huge
epub books. Pdfs are different, see below.
For a baseline, a simple
epub novel without illustrations other than the cover, but with lot of fonts, might be, say 5 or 6 Mb, extreme case. Removing the fonts and compressing the cover might bring it down to 0.2 to1.0 Mb depending on the text length -- short novel at one end to
War and Peace at the other.
All epubs are searchable, as the text in them is in html format...in other words, coded plain text. A "searchable pdf" on the other hand, is a pdf with text in it that is searchable...this is an option for a pdf.
To get started with the editor, Kovid has an excellent video tutorial:
https://calibre-ebook.com/demo#tutorials. Ebooks are complex critters, so there is a learning curve, but once you see the basics it is not too difficult.
So if you have a large epub, you can open it in the editor. There is a file browser that will let you see what is in it in the way of fonts and images, and how big each file is. You can remove fonts or subset them to reduce their size. You can compress images, or remove them. Explore the "Tools" section of the menu to find what you need.
Yes, you can really and truly mess up a book doing this. If you have school or scientific textbooks, you are best to just leave them alone. Work on a
copy of your book and see what happens.
Calibre is NOT a pdf editor. Taking fonts or images out of a pdf will have to be done with some other tool, and good luck. Pdfs are not meant to be edited.