I think that this is a question that will draw a lot of opinionated responses.
There are new technologies driving every day both on the front end and back-end that demand attention to stay 'current' with what is going on. I don't think that it is fair to say that either is 'harder' which will not earn me a lot of love.
I am a back-end engineer currently doing freelance independent contacting, and I am fully self employed in the U.S. and I have developed a lot of respect for front end developers in the last two years while pursuing a true full-stack set of skills. I work with Java, ansible, docker, kubernetes, and AWS for my development cycles and I find the front-end work to be the trickiest personally. I say that because it is typically what customers touch every day, so it gets the most scrutiny. My back-end code can be solid and the front-end engineer can screw up the UI and I will still take the fall, so I think it is worth noting that regardless of difficulty you need to think about what the customer will be looking at, at the end of the day.
I personally think that with traditional back-end coding you have to learn good coding practices to be able to fit into dev ecosystems, and you get very active feedback on when you're doing something wrong. I have not had the same experience with the front-end, I have seen a lot more of "Does it work? Cool. Sure we need to fix it, but we can do that later" while working on that side of products. In my experience that has led to rushed code that has bugs that are not easily found, or is just slow in general.
So which one is harder? I want to say back-end because I am a back-end engineer, every front-end engineer I know says the front-end is worse. So at this point I honestly think it more depends on what you know as an individual.
Doing non trivial stuff will be the challenge, not the programming language. With that said I think Javascript/front end is more of a moving target and you will constantly need to relearn the same things using new frameworks etc. In something like PHP or Perl you can get more years of relevant knowledge from your effort. But some people like shiny things that break often ;)
If JS didn't have a monopoly in browsers I think something else would have been more popular.
Back end is definitively a deeper area once you are past beginner/intermediate level.
Front-end is not as hard as people want it to appear.
Unfortunately the shiniest of tools in this space don't teach you the things you need to know to appreciate how straightforward it is.
#1. Perception: CSS is hard. Here are five JS tools, two bundlers and a build tool you can't write css without.
Reality: Don't cascade styles unless you absolutely need to.
#2. Perception: You don't know JavaScript if you're not writing ES6 / ES2015.
Reality: Browsers don't know ES6 / ES2015.
#3. Perception: Client-side rendering first. Use brand-name framework.
Reality: Server-side rendering first. Enhance with JavaScript.
---
Backend is not as easy as people want it to appear.
The backend is way more complicated in reality, but the tooling makes everything so straightforward you may not appreciate just how hard the problems you need to solve are.
#1. Perception: Deployment === Git push.
Reality: Perception plus Continuous Integration and automated backups that work.
#2. Perception: Infrastructure === PaaS.
Reality: Perception plus distributed computing, because there's only so much vertical scaling you can do before horizontal is a better choice on your pocket. Then you'll need an orchestrating layer to manage all those boxes / instances.
---
All is not what it appears to be.
When in doubt, use the simplest version of what is available to you.
Unfortunately the simplest of backend options won't take you as far as the simplest of front-end options.