You asked, "should I just accept the task and do it?" to which I would say "yes." Your employer is paying you for your time, that's how it works. If they're not using the time well or not using it fully, you have an obligation as an ethical employee to attempt the creation of business value for the duration of your compensated time.
You state this particular task won't keep you fully occupied when you noted "I would be sitting idle for most of the time and the task assigned to me is very minimalistic and does not help in improve my knowledge in anyway." Since you will have time available for other things, ask for other things. You clearly want something challenging, ask for something challenging.
In your conversation with your management, explain that you know the work is something that needs to be done and you don't mind doing it, but you have time and skills available for the creation of greater business value. With those under-utilized resources, you'd like to assume additional responsibilities to help when and where you can.