After several years of C/C++ Win32 application programming, I changed jobs and had to suddenly learn Pascal and Delphi. A few years later I switched from that to embedded C. After a few years of that I switched to database/web apps.
In each switch, I had to learn a new language, new rules, and in some cases learn where rules from other systems didn't apply anymore. It felt like starting from scratch, going from mentor to newbie, and it's highly uncomfortable.
The good thing is knowledge of data structures and algorithms helps everywhere. Math is priceless. If you can write good code on a web app, and make your database queries tight, then developing for an embedded CPU with limited memory, I/O, and speed won't be anything more difficult. It's just a matter of learning a new set of rules or a new language.
The real problem is how to learn a new specialization quickly. The answer is to just write a lot of code. When you encounter something you don't know how to do, ask google, buy books, ask stack overflow, or whatever, but write the code and try it. You can learn a lot by reading, but you learn more by experimenting.
I highly recommend making leaps. And if it takes a while to get hired as an embedded systems programmer, you still have the experience with web apps to keep you paid.