Not sure if you can compare them, what they have in common is that they handle VOIP, do a bit of call routing, allow for IVR and voice mail but that is where it sort of stops.
Asterisk
Has been arround for a while.
Runs on unix and linux. There is a windows version but I never used it.
Needs some scripting knowledge but help is available.
Supports at this stage more bells and whisles, although nice, they will introduce a complexity that most users do not need or want.
OpenSer
SER/OpenSER configuration is a black art and not for the faint of heart

That pretty much sums it up, unless you want to become your own VSP, i would do a runner. It runs on unix/Linux not sure if there are any windows version around.
3CX
Oh where do I start

(Hey it is a 3cx forum after all).
Better pictures

It has a nice graphical interface that if you install this in a company environment the receptionist can do the basic configurations and see which extensions are busy without to much training.
Works out of the box, well after download that is but you get my drift.
Simple setup, no scripting (although there is some freedom to do so as we noticed as time passed by).
The free version suits most users just fine.
Does not support as many features as Asterisk (does it really need to?)
Runs on Windows, so no unix/linux skills required.
Young dynamic company and support.
There is still a bit to do and to work on but considering the time its been arround the track record is not to bad at all.
How good 3CX compared to linux bases systems? Is it scalable?
Doesn't compare, again does it need to? one is windows and the other is linux.
Scalable? Yep, supports several PSTN/Gateways/Providers and a lot of extensions.
Conclusion:
Asterisk, runs on unix/linux if you have those environments, use them. Most people do not bother with other OS's than Windows. There is also a Windows version but not sure about that.
You need to do a lot of manual scripting (well there is some, lot might be a big word) and if you like that sort of thing Asterisk is your toy.
3CX on the other hand, is windows based. Once configured it runs well (very well actually) the application appears very sociable (eg works well in combination with other applications). Most companies and households have a PC running windows, you can easy install the software on that.
I could say it is almoust idiot proof, but there are some tricks that are required to make it work with some types of hw and sw. But that is where the forum is handy.
Hope this helps.
Henk.
PS this is my opinion, it might be that 3cx will have other ideas about this

.