Yes you can pursue a career as a commercial pilot even if you come from a non science (arts or commerce) stream. According to the article on Pilot CET's site many students who did not study Physics and Mathematics in 12th grade still become pilots after fulfilling certain eligibility requirements.
If you're switching from a non science stream here's a typical pathway and how long it may take:
Step 1: After finishing your 12th grade (arts/commerce) you'll need to pass the required subjects (Physics and Mathematics) through open schooling like NIOS or a recognized board. Time: Depending on when you enrol this might take 6 to 12 months or longer if you study part-time.
Step 2: Once eligible (12th + Physics & Maths + correct age + medical fitness), you join a flying school and start training for the Commercial Pilot Licence (CPL). Time: The flying training + exams for CPL in India generally take around 18 to 24 months (or sometimes more) for full-time commitment.
Step 3: After CPL you may need to accumulate flying hours get airline job interviews etc. This phase varies widely depending on your performance finances job market.
If you switch from a non science stream and immediately begin the bridging (Physics & Maths) and then full time pilot training, you could complete the core part in about 2 to 3 years. If there are delays (finances availability of seats training interruptions) it could stretch to 3 to 4 years or more.
Having a science background with Physics & Maths in 12th grade gives you a head start but it's not strictly mandatory for eligibility in many flying schools if you complete required subjects later.
Your success and timeline depend a lot on training quality medical fitness financial resources availability of flying hours and your own dedication.
Recent policy changes by Directorate General of Civil Aviation (DGCA) in India are moving towards more inclusive criteria for non science students.
Even after CPL you must build flying hours and meet airline requirements which takes additional time.