Why do we need to work?
I have asked this question myself, especially when I've become dissatisfied with my own career as a software engineer. There is much I could say in response to your question, but I feel it would be more wise to instead suggest that you ask yourself a different question.
Why do I work?
There are many different reasons why people seek employment, but to find direction and clarity, you need to look inside and find the reasons why you have chosen to work in your given career path.
- Do you need to the income to sustain yourself or others who depend upon you?
- Do you have financial obligations that you are expected to fulfill?
- Do you feel that you are obligated to work?
- Are you concerned that your education will be wasted if you don't continue to work?
- Do you find your work engaging or fulfilling?
- Does your work provide meaning?
- Do you want the money to indulge yourself in various material pleasures?
- Do you want the prestige that can come from working in your chosen field?
You have already answered some of these questions in your original post, but it's worth exploring them further.
I suspect that your confusion is due, in part, to a lack of appreciation for impermanence. All things change over time, including one's job. A career that may have been nearly perfect at one point may become dissatisfying later, due to a change in the job, a change in the industry, or a change in oneself.
As an example, early in my career, I had a job that I truly enjoyed. I found the work meaningful and it wasn't overly taxing (which I prefer.) I gained a lot of valuable experience, particularly with "soft skills." As a grew as a professional, I gained a deeper appreciation for the software development lifecycle; in particularly, I learned how the way an organization was structured and how it operated could impact how effective I and my colleagues were as developers.
Eventually, I learned about Agile Software Development Methodologies. The philosophies behind it mirrored my own observations, so I embraced Agile whole-heartedly. Unfortunately, the company I was working for was slow to adopt Agile and didn't begin to experiment with it until almost 20 years after the Agile Manifesto was released. Worse, though, I foresaw many obstacles that would prevent it from being successfully adopted. For that reason, I decided it was best I move on to a new company - one where I could leverage my experience to be more productive and contribute better to my peers, my employer, and society as a whole.
The job I worked at hadn't changed substantially. I, however, had changed. My goals and expectations had changed such that I was no longer satisfied with the job I originally was so enthusiastic about.
Being in the software industry, you should appreciate the need to keep your skills current. Knowledge isn't some possession that you acquire and then gain value from indefinitely. It's something that you need to nurture and grow over time; the value you get from it may be more or less depending upon your circumstances.
This isn't to say your education will become worthless, but rather that leveraging your education is an ongoing decision - one that you can change at any time.
In other words, there's nothing wrong with deciding to switch careers. Don't succumb to the sunk cost fallacy; do whatever is the right thing.
My advice is to schedule some time off to sit and reflect.
It doesn't have to be much; even a day off at home would be helpful. However, if you can arrange it, I would highly recommend finding a Buddhist community nearby. They may have an introductory workshop you can attend or (if you have enough experience) weekend retreats for mediation.
Whatever you do, be informed and intentional in your actions. There are plenty of opportunities for software engineers so don't be afraid to consider a new job. Also don't be afraid to "waste" your education. You may indeed find life as a monk more fulfilling, but not if you rush into it hoping to escape from your current dissatisfaction.
Best of luck on your journey. I wish you well!