Both are effective and both have a separate purpose. Compost mixed with Peat, perlite, vermiculite fungi, lime is a great stand alone medium.
Worm castings are simply 1 amendment to a complete grow medium. I suggest you look at alternatives to worm castings and learn about the different amendments that are similar. Then when building a soil or medium; You will make confident informed choices.
Amended soils only last through vegetative cycle and then you have to add nutrients or replant in bigger container with new enriched, amended soil. I do not give recommendations for commercial soil unless you include Foxfarm Ocean Forest. Even with this great premium soil; You have to add nutrients or new soil midway through grow.