all study no play slowly make despacito a dumb guy
How to study boring chess opening and endgame theories?
"... I'm convinced that Silman's [Complete Endgame Course] will take its place in history as one of the most popular endgame books ever. It has already caught on with the average player in a big way, confirming Silman's status as the king of instructional writers. He writes in a clear and casual style, and time and again has shown the ability to reach those who feel intimidated by the lofty approach that a grandmaster will often take. ... Silman ... defines what he thinks is necessary to know at specific rating levels. For example, the beginner or unrated player needs to know ... Silman's idea is to wait until you climb in strength before you worry about more advanced material. Then, as a Class 'E' player (that's 1000-1199), one must learn ... Silman's book emphasizes to the student that the important thing is to master the strictly limited material at hand, rather than get confused by endings that won't help your results at that level. Perhaps even more importantly, Silman is able to use his teaching experience and talk to his readers in a way that they can handle, in a friendly manner and without condescension. ... I'll also repeat the point that David Ellinger in ChessCafe makes: '[This ...] demonstrates who this book will truly serve best: anybody who coaches chess. For me, as a perpetually near-2000 player who does part-time coaching, I’ve got in my hands a great resource that will have something for every student, no matter the rating.' ..." - IM John Watson (2007)
http://theweekinchess.com/john-watson-reviews/theres-an-end-to-it-all
https://web.archive.org/web/20140708103149/http://www.chesscafe.com/text/review594.pdf
https://www.silmanjamespress.com/shop/chess/silmans-complete-endgame-course/

How to study boring chess opening and endgame theories? Is there any way to make it interesting?
No.
"... Everyman Chess has started a new series aimed at those who want to understand the basics of an opening, i.e., the not-yet-so-strong players. ... I imagine [there] will be a long series based on the premise of bringing the basic ideas of an opening to the reader through plenty of introductory text, game annotations, hints, plans and much more. ..." - FM Carsten Hansen (2002)
https://web.archive.org/web/20140627055734/http://www.chesscafe.com/text/hansen38.pdf
That particular series seems to have been discontinued, but there are somewhat similar books in newer series (First Steps and Move by Move). My guess is that it is a good idea to look for books with a primary focus on sample games.
I do not get the impression that Despacito_slowly had decided that ending study was too boring. Indeed, it seemed to me that there was an expressed desire to do more of it.

Besides the fact that openings and endgames are some of the beautiful aspects of chess and interesting in their own way from both an artistic and scientific point of view, you can become motivated from knowing that being skilled at openings and endgames increases your chances of winning games...
... openings and endgames are some of the beautiful aspects of chess and interesting in their own way from both an artistic and scientific point of view, ...
I do not think that all authors are equally successful in giving a feeling of beauty-contemplation to the reader.

Tactical Chess Endings by Nunn is not boring IMO. Opening study is boring to OP? Very few chess players dislike opening study.
... Opening study is boring to OP? Very few chess players dislike opening study.
It seems to me we see fairly frequent appeals for advice on how to go about studying openings. I would think that a fair number of players find the undertaking to be a problem.
Endgame principles did not change, ...
But perhaps there is change, from one book to another, with regard to the degree to which the reader is inspired to experience a feeling of beauty-contemplation?

Honestly... All human games aren't worth studying for endgames. With 7 men EGTB installed, engines play the endings with precision.
If it's boring, why study it at all? Aren't you playing for fun?