Parent/Child table design?
If a Parent Task and Subtask are essentially identical, save their rank in a hierarchy, then yes, a single table is appropriate. You can use a nullable foreign key to the primary key in the same table like this:

create table tasks (
  task_id bigserial primary key,
  subject text,
  ...,
  parent_task_id bigint null references tasks(task_id)
);


If your database server does Recursive Common Table Expressions (example PostgreSQL), then use those for querying. Here are some examples.